Queries in external file