I am using mysql database.
I have two table one is user_songs
and second is user_like
Fields of user_song
:
id(auto incement)
song_id
user_id
song_name
song_file
Fields of user_like
:
id(auto incement)
song_id
uder_id
like
In user_like
I am saving data where any user going like song so each row contain data like:
1 1 1 1
Please note like saves either 0 or 1.0 for dislike and 1 for like.
Now I need to find out top 20 most like songs id
from user_like
and get all data from user_songs
from user_songs
.
How to do this?
Thanks in advance to spend your valuable time to solve this query.