Create Queries and Export Files