Simplified query generation