Output the query on thetemplate.