return query text with result