2 of 5 deleted 38 characters in body; edited title

How can I get SQL queries to show in output file?

I tried executing set of queries from a shell script but the input query is not displayed along with output in the log. Only the outputs are being captured in the log file. Is there a way to capture the input query along with the corresponding input?

I did set echo on but it still did not work.