print query in views