Skip to content

Instantly share code, notes, and snippets.

@databraineo
Created August 16, 2019 08:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save databraineo/d90744c4261a09cebc47e31450d9157a to your computer and use it in GitHub Desktop.
Code examples for SQL 1x1 blog-article - 13
SELECT
substr(Name,1,1) as [Index],
count(TrackId) AS Anzahl,
avg(Milliseconds)/600000 as MW
FROM Track
WHERE substr(Name,1,1) in ('A','E','I','O','U')
GROUP BY substr(Name,1,1)
HAVING count(TrackId) > 50
ORDER BY substr(Name,1,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment