Query processor processes queries