Complex SQL query... 3 tables and need the most popular in the last 24 hours using timestamps!

Posted by Stefan on Stack Overflow See other posts from Stack Overflow or by Stefan
Published on 2010-04-26T14:57:10Z Indexed on 2010/04/26 15:03 UTC
Read the original article Hit count: 348

Filed under:
|
|
|
|

Hey guys,

I have 3 tables with a column in each which relates to one ID per row. I am looking for an sql statement query which will check all 3 tables for any rows in the last 24 hours (86400 seconds) i have stored timestamps in each tables under column time.

After I get this query I will be able to do the next step which is to then check to see how many of the ID's a reoccurring so I can then sort by most popular in the array and limit it to the top 5...

Any ideas welcome! :)

Thanks in advanced.

Stefan

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql