SIMPLE QUERY TEMPLATE ==================== Question: {question} DATABASE SCHEMA: earning table: - date (DATETIME): Date of the earning - amount (DECIMAL): Amount earned - name (VARCHAR): Agent name - type (VARCHAR): Type of income - description (VARCHAR): Description of the earning - pair_names (VARCHAR): Names of people involved member table: - id (INT): Agent ID - name (VARCHAR): Agent name - email (VARCHAR): Agent email - phone (VARCHAR): Agent phone number INSTRUCTIONS: - Generate SQL directly for the question - Use exact date ranges when specified (e.g., "july 1 to july 10" → BETWEEN '2025-07-01' AND '2025-07-10') - Use COALESCE(SUM(amount), 0) for total calculations to show 0 instead of NULL when no data exists - Use underscores in column aliases (e.g., total_revenue, not "Total Revenue") - Use proper date functions for time-based queries GENERATE SQL: