added utility to print compiled SQL query