Hello, I am looking to trace all query results back to the user who ran the query.
For saved queries, I can do this by taking the id or the query_hash field in the query_results
table and matching it to the latest_query_data_id or query_hash field in the queries
table.
However, for unsaved queries, I haven’t found a similar solution. The events
table holds the execute_query actions, but it does not record a query_hash or a latest_query_by_id field.
Currently, the best solution I have found is searching the events
table for any execute_query actions with the same query and a similar created_at value to the query result in the query_results
table.
Is there a better way to trace query results from unsaved queries back to their user? Possibly a way to find the query_hash for unsaved queries? Thank you!