PDA

View Full Version : show the most views threads from the last month


derdiedastim
06-30-2011, 11:14 AM
Hi,
is there a SQL-Query that read out the thread(ids) with the most views last month?

I didn't find a solution.
Ich can only read out the most views threads ALL TIME...
SELECT threadid,title FROM thread ORDER BY views DESC

Thanks..

kh99
06-30-2011, 01:16 PM
I don't think that information is in the database. Of course what you could do it make a monthly scheduled task to save the views for each thread to another db table, then starting next month you would be able to calculate the value you want.