Can someone help me with this query. I have this table for sample:
FILE Table
- UID
- file
- uploaded_on_date
- view_count
What I want to consider is the top 30 most recent uploaded file and top 30 most viewed file then randomly select from them and limit by 10.
I am new to this mysql complex queries. A sample query would be good and i will be able to understand it. Thanks.
ORDER BY RAND()type solutions will be very slow when the number of rows starts growing, just google fororder by rand slow. Of course you won't notice this when selecting from 2*30 rows.