XF 1.1 SQL query (view and post count)

fredrikse

Active member
Hi,

I need help on two different SQL queries that I would like to run on my DB:

1. Retrieve the top 5 threads for year 2014 which have been viewed the most?

2. Retrieve the top 5 threads for year 2014 which have most answers?

Thanks,

Fredrik
 
I'm not sure about 1.1, but you can try
Code:
SELECT thread_id, title, reply_count from xf_thread where post_date>unix_timestamp('2014-01-01') order by 3 desc limit 5
and
Code:
SELECT thread_id, title, view_count from xf_thread where post_date>unix_timestamp('2014-01-01') order by 3 desc limit 5
 
Back
Top Bottom