I have created a simple query with stats command and I'm able to see the required results.
If same search is ran by another user he is not able to see results but if that user removes commands from the search query he is able to see events.
I checked permission of that user and it have same roles which I have.
So I beleive it's not a permission issue.
It's a single node. Below is the search query which I'm using.
index=abc host=xyz "Error executed unexpected" | stats count(error_id) as error
If user is running whole seach query he is not able to see results where as if user is not using command he is able to see events.