Logs of All queries

I am using version (v1.34.3) of metabase.
I am not using EnterPrise Version, So “audit log” feature is not available for me.

I want to see all queries(Questions) which is executed in last month, Where can i see this data?
I have checked the logs of metabase

But not able to see any query(Questions logs)
.Please Anyone help me on this.

Hi @BatmanSuperman
If you don’t have a license for the Enterprise Edition, then you should use the Community Edition.
You would have to look in the application database to see the information, specifically in the table query and query_execution
See this topic for more about how to get information from metadata: Metabase Metadata SQL

Thanx @flamber, I went through the query,and query_cache.
My query_cache rows count is zero.
I am running Questions/query(native) and after executing, checked the count of the query table(select count(*) from query) some times it is increasing some times not.
I think all the query is not logging in query table.
Could you please explain this?
and Could you please give me a query by which i am able to get all executed questions and queries?

@BatmanSuperman I didn’t write anything about query_cache.
When a query already exists, then it will not add it again to query. But it will be in query_execution.
If you’re looking to do audit, then I would recommend the Audit feature in Enterprise Edition, which is just one of many features.
Otherwise you’ll need to do some searching in the application database. Also try searching the forum, which has other examples.

Thanx alot @flamber,

This feature is released for Prepend Query Metadata in SQL Comment.

When i am running a native query then prepend is happened by default or we have to add comment (-- metabase: UserID …) before our query .
If it is happend by default where can i see all “Prepend data”?
In which table this prepend data is stored?
Please help me on this.
Thanx alot.

@BatmanSuperman The query is not prepended in the comment, but the hash is.

Thanx @flamber for reply back.

I want to see who is executed my query, I can see the queries(from query table) but i am not able to see the below metadata.
– Metabase:: userID: 2 executionID: 170cbab5-090b-4be5-b286-1168f9439b5a queryType: MBQL queryHash: 1005045833

If i am running a query with some prepend data (–Metabase:: batman) then this data is coming in the QueryTable, But i am running a query without prepend data, Then there is no prepend data in the QueryTable except hash.
Could you please Explain This is default feature or We have to add prepend data in each query?

You’re asking for a feature, which is part of the Enterprise Edition. So use that, otherwise you need to use more time to understand the structure, so you can build you own.
query_execution includes a column called executor_id, which is the user ID from core_user