initial commit of query script

initial commit