Parse query-commands