From Insensitive Bird, 8 Months ago, written in Plain Text, viewed 183 times.
URL http://codebin.org/view/569c0428 Embed
Download Paste or View Raw
  1. SELECT g.name,
  2.             COUNT(t.track_id)
  3. FROM track AS t
  4. INNER JOIN invoice_line AS il ON t.track_id=il.track_id
  5. INNER JOIN invoice AS i ON i.invoice_id=il.invoice_id
  6. INNER JOIN track ON t.track_id = il.track_id
  7. INNER JOIN genre AS g ON t.genre_id = g.genre_id
  10. GROUP BY g.name -- добавьте поле для группировки
  11. ORDER BY COUNT(t.track_id) DESC

Replies to Untitled rss

Title Name Language When
Re: Untitled Smelly Finch text 8 Months ago.

Reply to "Untitled"

Here you can reply to the paste above