Initial version of queries shell script