I probably shouldn't have said the syntax is awful because as you say, I've never seen anything better. But I just think that SQL is this nice composable structure but it seems needlessly awkward to write from my naive point of view. I keep thinking that something more lisp-like would be nicer, but perhaps it wouldn't work. Maybe it's something I can try as an experiment some day :-)