Created a query script