title: SQL random 4 rows with distinct column
body: <p>I have table representing music tracks with columns id, artist, name, src, sample_start and level.
  I want to select random 4 rows but with distinct artists and specified level.
  The closest I got was this, but it's not random as max id is selected. </p>
  
  <pre><code>'SELECT * FROM tracks WHERE level = :level AND id IN
   (SELECT max(id) FROM tracks GROUP BY artist)
   ORDER BY RAND() LIMIT 4'
  </code></pre>