Query language implementation