Skip to content

Commit

Permalink
examples of sql
Browse files Browse the repository at this point in the history
  • Loading branch information
gAmUssA committed Jun 25, 2024
1 parent daf7b6c commit 7d7c1d2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 01_pinot/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,23 @@ include::Makefile[lines=54..56]
+
[source,sql]
----
-- number of movies with Mel Gibson
SELECT count(*) FROM movies
WHERE actors = 'Mel Gibson';
-- the most prolific directors
SELECT directors, COUNT(*) AS movieCount
FROM movies
GROUP BY directors
ORDER BY movieCount DESC
-- Popular Genres Over Time
SELECT genres, releaseYear, COUNT(*) AS movieCount
FROM movies
WHERE releaseYear >= 2014
GROUP BY genres, releaseYear
ORDER BY releaseYear, movieCount DESC
----

* *Troubleshooting:*
Expand Down

0 comments on commit 7d7c1d2

Please sign in to comment.