For those interested in database query languages, it is worth knowing about Datalog, the query language behind Datomic, XTDB and Datahike: http://www.learndatalogtoday.org/
E.g. a parameterised aggregate query that retrieves the name and average rating of a film starring cast members whose names match the input names:
This is the Datomic/Clojure dialect of Datalog. I had an easier time learning a stand-alone datalog variant. I think compiling Datalog to SQL is an interesting idea.
E.g. a parameterised aggregate query that retrieves the name and average rating of a film starring cast members whose names match the input names:
To reveal the answer, click on tab labelled "3" and then "I give up!": http://www.learndatalogtoday.org/chapter/7