While I am familiar with SQL, I am not familiar with any of the libraries you
mention on the wiki page (Ecto, Honey SQL and Slick), so maybe I am not the
target audience...
Your sections about "Joins Are Values" and "Aggregates are self-contained"
seem difficult to follow: I think I understand the overall idea, but it is not
clear from the document how any of it can be useful. Also, it is not clear
what `Department?` and `Course?` are in the first code snippet -- are they
functions that the user has to provide or is it something that your library
generates by looking at the database schema?
I would suggest to provide a database schema and some sample data in a
database, and use this in the subsequent examples. Start with a simple but
complete working example and construct more complex, but still complete and
working examples from them, at each step illustrating the benefits that the
library provides. Maybe contrast each step with how the plain SQL would look
as well?
Alex.