How is Search Terms report produced?

I am looking to put together a SQL query to show me top search items for any given date range along with the CTR. Does anyone know how is the Search Logs report produced (it’s in …/admin/logs/search_logs?period=weekly) and especially how is the CTR calculated?

I see that there is a search_logs table, but not sure what is being looked at for CTR.


What an old topic without an answer, let’s bump it :smiley:

I would like to find out which topics were clicked for particular search term. I found this query, which comes close, but the tables seem to be deprecated since then:

Is there any way to achieve it on the latest version?



Should give you all you need to know.