tried to generate a query