Re:The SQL filter clause: selective aggregates
by rubyfan on Monday May 30, 2016 @03:30PM
(#11802679)
The Scala package Circumflex ORM had such a feature ~6 years ago. It had some problems here and there but was interesting to write SQL as native Scala.
http://circumflex.ru/projects/orm/index.html