title: MySQL Rank Comparison
body: <p>What I am trying to do is equivalent to a "music charts" table.</p>
  
  <p>I have a table of video plays, and i want to rank the videos that have been played in the last 24 hours, and compare them to the rank they were the 24 hours before that.</p>
  
  <p>So the output should be the VideoID, The current Rank of the ID, and the rank the day previous of the ID</p>
  
  <p>The table consists of:</p>
  
  <pre><code>PlayID (the specific id to the play table)
  IP (IP address of the user who played the video)
  VIDEOID (ID of the specific video, what needs to be ranked by most occurances)
  playtime (linux time when played)
  </code></pre>
  
  <p>the table is called video_plays7d.</p>
  
  <p>This has been stumping me, and i cannot figure it out, any ideas?</p>