how to query your script