print sql queries