In my CS curriculum we learned SQL in theory only. We learned the relational model, normalization, joins, predicates, aggregation, etc. all without ever touching an actual database. In the exams we wrote queries in a paper "blue book" which was graded by teaching assistants.