Inner Join

From Anna Zhukova, 9 Months ago, written in Plain Text, viewed 105 times. This paste will self destruct in 1 Second.
URL http://codebin.org/view/0df4ffd1 Embed
Download Paste or View Raw
  1. SELECT t.name,
  2.        SUM(i.quantity),
  3.        pt.playlist_id,
  4.        pl.name
  5. FROM track AS t
  6. INNER JOIN invoice_line AS i ON t.track_id=i.track_id
  7. INNER JOIN playlist_track AS pt ON t.track_id=pt.track_id
  8. INNER JOIN playlist AS pl ON pt.playlist_id=pl.playlist_id
  9. GROUP BY t.name, pt.playlist_id, pl.name
  10. LIMIT 20;

Reply to "Inner Join"

Here you can reply to the paste above