title: MySQL query for finding the most liked video this month
body: <p>I have a table of songs each with a unique id and publish date</p>
  
  <pre><code>id | name | pub_date
  </code></pre>
  
  <p>Also a table containing likes which have the video id, user id making the like and also the user who uploaded the videos id:</p>
  
  <pre><code>song_id | user_id | songuser_id
  </code></pre>
  
  <p>The query I need to make is to find the 10 most liked videos that have been uploaded in the current month. Here is what I have so far:</p>
  
  <pre><code>SELECT songs.id, songs.name, songs.pub_date, COUNT(likes.song_id) as likecount 
  FROM `songs` INNER JOIN `likes` on songs.id = likes.song_id
  WHERE MONTH(CAST(songs.pub_date as date)) = MONTH(NOW()) 
  AND YEAR(CAST(songs.pub_date as date)) = YEAR(NOW()) 
  ORDER BY likecount DESC LIMIT 5
  </code></pre>
  
  <p>But I only seem to return 1 result. I think the issue I'm having is to do with grouping the likes but I can't figure it out. Any help would be appreciated.</p>
  
  <p>Thanks, James.</p>