Blurbs ansible coffeescript django dvcs erlang es6 hg javascript json lua mercurial peewee postgresql python scope sql sqlalchemy yaml

DISTINCT ON code postgresqlsql

SELECT DISTINCT ON (genre) artist, genre, count_by_genre
FROM artists_and_genres
ORDER BY genre, count_by_genre DESC;