Query language specs and implementation