Query anguage implementation