Untitled
unknown
plain_text
a year ago
516 B
5
Indexable
Never
SELECT t.name, SUM(i.quantity), pt.playlist_id, pl.name AS playlist-- укажите необходимое поле FROM track AS t INNER JOIN invoice_line AS i ON t.track_id=i.track_id INNER JOIN playlist_track AS pt ON t.track_id=pt.track_id INNER JOIN playlist AS pl ON pt.playlist_id = pl.playlist_id GROUP BY t.name, pt.playlist_id, pl.playlist_id LIMIT 20-- добавьте новое поле для группировки -- добавьте ещё одно присоединение