query is printing