[
  {
    "input": {
      "text": "Get the total number of accounts created in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as total_accounts FROM ACCOUNT GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id0"
  },
  {
    "input": {
      "text": "Find the average age of clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(CASE WHEN c.birth_date LIKE '%YYMMDD' THEN 2000 + SUBSTR(c.birth_date, 1, 2) + 1900 - 2000 ELSE 2000 + SUBSTR(c.birth_date, 1, 2) + 50 + 1900 - 2000 END) as avg_age FROM CLIENT c JOIN district d ON c.district_id = d.district_id GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id1"
  },
  {
    "input": {
      "text": "Get the total number of loans granted to clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, COUNT(*) as total_loans FROM loan l JOIN ACCOUNT a ON l.account_id = a.account_id JOIN CLIENT c ON a.account_id = c.client_id JOIN district d ON c.district_id = d.district_id GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id2"
  },
  {
    "input": {
      "text": "Find the average balance of accounts in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id JOIN CLIENT c ON a.account_id = c.client_id JOIN district d ON c.district_id = d.district_id GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id3"
  },
  {
    "input": {
      "text": "Get the total number of credit card transactions in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, COUNT(*) as total_transactions FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id JOIN CLIENT c ON a.account_id = c.client_id JOIN card cd ON a.account_id = cd.account_id JOIN district d ON c.district_id = d.district_id WHERE t.type = 'PRIJEM' GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id4"
  },
  {
    "input": {
      "text": "Find the average salary of clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(d.A11) as avg_salary FROM district d JOIN CLIENT c ON d.district_id = c.district_id GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id5"
  },
  {
    "input": {
      "text": "Get the total number of clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, COUNT(*) as total_clients FROM CLIENT c JOIN district d ON c.district_id = d.district_id GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id6"
  },
  {
    "input": {
      "text": "Find the average number of crimes committed in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(d.A15) as avg_crimes FROM district d GROUP BY d.district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id7"
  },
  {
    "input": {
      "text": "Get the total number of loans with a duration of more than 1 year."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE duration > 12;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id8"
  },
  {
    "input": {
      "text": "Find the average amount of loans granted to clients."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_loan_amount FROM loan;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id9"
  },
  {
    "input": {
      "text": "Get the total number of credit card transactions with a type of 'VYBER KARTOU'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_transactions FROM Trans WHERE type = 'VYBER KARTOU';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id10"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a frequency of 'POPLATEK MESICNE'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.frequency = 'POPLATEK MESICNE';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id11"
  },
  {
    "input": {
      "text": "Get the total number of loans with a status of 'A'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE status = 'A';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id12"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'PRIJEM'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'PRIJEM';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id13"
  },
  {
    "input": {
      "text": "Get the total number of clients with a birth date in the year 1990."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_clients FROM CLIENT WHERE birth_date LIKE '%1990%';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id14"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a district_id of 1."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.district_id = 1;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id15"
  },
  {
    "input": {
      "text": "Get the total number of loans with a duration of 6 months."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE duration = 6;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id16"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'VYDAJ'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'VYDAJ';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id17"
  },
  {
    "input": {
      "text": "Get the total number of clients with a sex of 'M'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_clients FROM CLIENT WHERE birth_date LIKE '%YYMMDD';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id18"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a frequency of 'POPLATEK TYDNE'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.frequency = 'POPLATEK TYDNE';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id19"
  },
  {
    "input": {
      "text": "Get the total number of loans with a status of 'C'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE status = 'C';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id20"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'VKLAD'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'VKLAD';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id21"
  },
  {
    "input": {
      "text": "Get the total number of clients with a birth date in the year 1980."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_clients FROM CLIENT WHERE birth_date LIKE '%1980%';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id22"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a district_id of 2."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.district_id = 2;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id23"
  },
  {
    "input": {
      "text": "Get the total number of loans with a duration of 3 months."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE duration = 3;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id24"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'PREVOD Z UCTU'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'PREVOD Z UCTU';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id25"
  },
  {
    "input": {
      "text": "Get the total number of clients with a sex of 'F'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_clients FROM CLIENT WHERE birth_date LIKE '%YYMM+50DD';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id26"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a frequency of 'POPLATEK PO OBRATU'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.frequency = 'POPLATEK PO OBRATU';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id27"
  },
  {
    "input": {
      "text": "Get the total number of loans with a status of 'D'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE status = 'D';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id28"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'PREVOD NA UCET'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'PREVOD NA UCET';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id29"
  },
  {
    "input": {
      "text": "Get the total number of clients with a birth date in the year 1995."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_clients FROM CLIENT WHERE birth_date LIKE '%1995%';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id30"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a district_id of 3."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) as avg_balance FROM Trans t JOIN ACCOUNT a ON t.account_id = a.account_id WHERE a.district_id = 3;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id31"
  },
  {
    "input": {
      "text": "Get the total number of loans with a duration of 9 months."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as total_loans FROM loan WHERE duration = 9;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id32"
  },
  {
    "input": {
      "text": "Find the average amount of transactions with a type of 'VYBER'."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_amount FROM Trans WHERE type = 'VYBER';"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id33"
  },
  {
    "input": {
      "text": "Get the total number of accounts created in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as total_accounts FROM ACCOUNT GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id34"
  },
  {
    "input": {
      "text": "Find the average balance of accounts in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(balance) as avg_balance FROM Trans GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id35"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of clients."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_clients FROM CLIENT GROUP BY district_id ORDER BY num_clients DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id36"
  },
  {
    "input": {
      "text": "Find the average age of clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(DATEDIFF(CURRENT_DATE, birth_date) / 365) as avg_age FROM CLIENT GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id37"
  },
  {
    "input": {
      "text": "Get the total number of loans granted in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_loans FROM loan GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id38"
  },
  {
    "input": {
      "text": "Find the average loan amount in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_loan_amount FROM loan GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id39"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of credit card holders."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_credit_cards FROM card GROUP BY district_id ORDER BY num_credit_cards DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id40"
  },
  {
    "input": {
      "text": "Find the average credit card limit in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_credit_limit FROM card GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id41"
  },
  {
    "input": {
      "text": "Get the total number of transactions in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_transactions FROM Trans GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id42"
  },
  {
    "input": {
      "text": "Find the average transaction amount in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_transaction_amount FROM Trans GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id43"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of debit transactions."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_debit_transactions FROM Trans WHERE type = 'VYDAJ' GROUP BY district_id ORDER BY num_debit_transactions DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id44"
  },
  {
    "input": {
      "text": "Find the average debit transaction amount in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_debit_amount FROM Trans WHERE type = 'VYDAJ' GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id45"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of credit transactions."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_credit_transactions FROM Trans WHERE type = 'PRIJEM' GROUP BY district_id ORDER BY num_credit_transactions DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id46"
  },
  {
    "input": {
      "text": "Find the average credit transaction amount in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_credit_amount FROM Trans WHERE type = 'PRIJEM' GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id47"
  },
  {
    "input": {
      "text": "Get the total number of loans with a duration of more than 1 year."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as num_long_term_loans FROM loan WHERE duration > 12;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id48"
  },
  {
    "input": {
      "text": "Find the average loan amount for loans with a duration of more than 1 year."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_long_term_loan_amount FROM loan WHERE duration > 12;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id49"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of clients with a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_clients_with_loan FROM CLIENT JOIN loan ON CLIENT.client_id = loan.account_id GROUP BY district_id ORDER BY num_clients_with_loan DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id50"
  },
  {
    "input": {
      "text": "Find the average age of clients with a loan in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(DATEDIFF(CURRENT_DATE, birth_date) / 365) as avg_age FROM CLIENT JOIN loan ON CLIENT.client_id = loan.account_id GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id51"
  },
  {
    "input": {
      "text": "Get the total number of credit cards issued in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_credit_cards FROM card GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id52"
  },
  {
    "input": {
      "text": "Find the average credit limit of credit cards issued in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_credit_limit FROM card GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id53"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of debit transactions per account."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(COUNT(*)) as avg_debit_transactions_per_account FROM Trans WHERE type = 'VYDAJ' GROUP BY district_id ORDER BY avg_debit_transactions_per_account DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id54"
  },
  {
    "input": {
      "text": "Find the average debit transaction amount per account in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_debit_amount_per_account FROM Trans WHERE type = 'VYDAJ' GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id55"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of credit transactions per account."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(COUNT(*)) as avg_credit_transactions_per_account FROM Trans WHERE type = 'PRIJEM' GROUP BY district_id ORDER BY avg_credit_transactions_per_account DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id56"
  },
  {
    "input": {
      "text": "Find the average credit transaction amount per account in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(amount) as avg_credit_amount_per_account FROM Trans WHERE type = 'PRIJEM' GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id57"
  },
  {
    "input": {
      "text": "Get the total number of accounts with a balance greater than 100,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as num_high_value_accounts FROM Trans WHERE balance > 100000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id58"
  },
  {
    "input": {
      "text": "Find the average balance of accounts with a balance greater than 100,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(balance) as avg_high_value_balance FROM Trans WHERE balance > 100000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id59"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of accounts with a balance greater than 100,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_high_value_accounts FROM Trans WHERE balance > 100000 GROUP BY district_id ORDER BY num_high_value_accounts DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id60"
  },
  {
    "input": {
      "text": "Find the average age of clients with a balance greater than 100,000 in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(DATEDIFF(CURRENT_DATE, birth_date) / 365) as avg_age FROM CLIENT JOIN Trans ON CLIENT.client_id = Trans.account_id WHERE balance > 100000 GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id61"
  },
  {
    "input": {
      "text": "Get the total number of accounts with a debit transaction amount greater than 10,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as num_high_value_debit_transactions FROM Trans WHERE type = 'VYDAJ' AND amount > 10000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id62"
  },
  {
    "input": {
      "text": "Find the average debit transaction amount of accounts with a debit transaction amount greater than 10,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_high_value_debit_amount FROM Trans WHERE type = 'VYDAJ' AND amount > 10000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id63"
  },
  {
    "input": {
      "text": "Get the top 5 districts with the highest number of accounts with a debit transaction amount greater than 10,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, COUNT(*) as num_high_value_debit_transactions FROM Trans WHERE type = 'VYDAJ' AND amount > 10000 GROUP BY district_id ORDER BY num_high_value_debit_transactions DESC LIMIT 5;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id64"
  },
  {
    "input": {
      "text": "Find the average age of clients with a debit transaction amount greater than 10,000 in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT district_id, AVG(DATEDIFF(CURRENT_DATE, birth_date) / 365) as avg_age FROM CLIENT JOIN Trans ON CLIENT.client_id = Trans.account_id WHERE type = 'VYDAJ' AND amount > 10000 GROUP BY district_id;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id65"
  },
  {
    "input": {
      "text": "Get the total number of accounts with a credit transaction amount greater than 10,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(*) as num_high_value_credit_transactions FROM Trans WHERE type = 'PRIJEM' AND amount > 10000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id66"
  },
  {
    "input": {
      "text": "Find the average credit transaction amount of accounts with a credit transaction amount greater than 10,000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(amount) as avg_high_value_credit_amount FROM Trans WHERE type = 'PRIJEM' AND amount > 10000;"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id67"
  },
  {
    "input": {
      "text": "Find the total number of clients who have taken a loan and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(DISTINCT c.client_id) FROM loan l JOIN disp d ON l.account_id = d.account_id JOIN card c ON d.disp_id = c.disp_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id68"
  },
  {
    "input": {
      "text": "Calculate the average balance of accounts that have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) FROM card c JOIN trans t ON c.disp_id = t.account_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id69"
  },
  {
    "input": {
      "text": "Find the top 5 districts with the highest number of accounts."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, COUNT(a.account_id) AS num_accounts FROM account a JOIN district d ON a.district_id = d.district_id GROUP BY d.district_id ORDER BY num_accounts DESC LIMIT 5"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id70"
  },
  {
    "input": {
      "text": "Calculate the total amount of loans granted to clients in each district."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, SUM(l.amount) AS total_loans FROM loan l JOIN account a ON l.account_id = a.account_id JOIN district d ON a.district_id = d.district_id GROUP BY d.district_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id71"
  },
  {
    "input": {
      "text": "Find the clients who have taken a loan and have a balance of less than 0."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM loan l JOIN account a ON l.account_id = a.account_id JOIN trans t ON a.account_id = t.account_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id72"
  },
  {
    "input": {
      "text": "Calculate the average salary of clients who have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(d.A11) FROM card c JOIN disp d ON c.disp_id = d.disp_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id73"
  },
  {
    "input": {
      "text": "Find the top 3 types of transactions with the highest average amount."
    },
    "references": [
      {
        "output": {
          "text": "SELECT t.type, AVG(t.amount) AS avg_amount FROM trans t GROUP BY t.type ORDER BY avg_amount DESC LIMIT 3"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id74"
  },
  {
    "input": {
      "text": "Calculate the total number of transactions for each type of card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.type, COUNT(t.trans_id) AS num_transactions FROM card c JOIN trans t ON c.disp_id = t.account_id GROUP BY c.type"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id75"
  },
  {
    "input": {
      "text": "Find the clients who have a balance of more than 10000 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id WHERE t.balance > 10000"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id76"
  },
  {
    "input": {
      "text": "Calculate the average age of clients who have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(EXTRACT(YEAR FROM c.birth_date) - EXTRACT(YEAR FROM l.date)) AS avg_age FROM loan l JOIN client c ON l.account_id = c.client_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id77"
  },
  {
    "input": {
      "text": "Find the top 5 districts with the highest number of clients."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, COUNT(c.client_id) AS num_clients FROM client c JOIN district d ON c.district_id = d.district_id GROUP BY d.district_id ORDER BY num_clients DESC LIMIT 5"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id78"
  },
  {
    "input": {
      "text": "Calculate the total amount of transactions for each type of loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT l.type, SUM(t.amount) AS total_amount FROM loan l JOIN trans t ON l.account_id = t.account_id GROUP BY l.type"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id79"
  },
  {
    "input": {
      "text": "Find the clients who have a credit card and have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM card c JOIN disp d ON c.disp_id = d.disp_id JOIN loan l ON d.account_id = l.account_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id80"
  },
  {
    "input": {
      "text": "Calculate the average balance of accounts that have a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(t.balance) FROM loan l JOIN trans t ON l.account_id = t.account_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id81"
  },
  {
    "input": {
      "text": "Find the top 3 types of transactions with the highest number of transactions."
    },
    "references": [
      {
        "output": {
          "text": "SELECT t.type, COUNT(t.trans_id) AS num_transactions FROM trans t GROUP BY t.type ORDER BY num_transactions DESC LIMIT 3"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id82"
  },
  {
    "input": {
      "text": "Calculate the total number of clients who have a credit card and have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(DISTINCT c.client_id) FROM card c JOIN disp d ON c.disp_id = d.disp_id JOIN loan l ON d.account_id = l.account_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id83"
  },
  {
    "input": {
      "text": "Find the clients who have a balance of less than 0 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id84"
  },
  {
    "input": {
      "text": "Calculate the average salary of clients who have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(d.A11) FROM loan l JOIN client c ON l.account_id = c.client_id JOIN disp d ON c.client_id = d.client_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id85"
  },
  {
    "input": {
      "text": "Find the top 5 districts with the highest average salary."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(d.A11) AS avg_salary FROM client c JOIN disp d ON c.client_id = d.client_id GROUP BY d.district_id ORDER BY avg_salary DESC LIMIT 5"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id86"
  },
  {
    "input": {
      "text": "Calculate the total amount of transactions for each type of card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.type, SUM(t.amount) AS total_amount FROM card c JOIN trans t ON c.disp_id = t.account_id GROUP BY c.type"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id87"
  },
  {
    "input": {
      "text": "Find the clients who have a credit card and have a balance of more than 10000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id WHERE t.balance > 10000"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id88"
  },
  {
    "input": {
      "text": "Calculate the average age of clients who have taken a loan and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(EXTRACT(YEAR FROM c.birth_date) - EXTRACT(YEAR FROM l.date)) AS avg_age FROM loan l JOIN client c ON l.account_id = c.client_id JOIN card cc ON c.client_id = cc.disp_id"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id89"
  },
  {
    "input": {
      "text": "Find the top 3 types of transactions with the highest average amount for clients who have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT t.type, AVG(t.amount) AS avg_amount FROM loan l JOIN trans t ON l.account_id = t.account_id GROUP BY t.type ORDER BY avg_amount DESC LIMIT 3"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id90"
  },
  {
    "input": {
      "text": "Calculate the total number of clients who have taken a loan and have a credit card and have a balance of less than 0."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(DISTINCT c.client_id) FROM loan l JOIN account a ON l.account_id = a.account_id JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id91"
  },
  {
    "input": {
      "text": "Find the clients who have a credit card and have taken a loan and have a balance of more than 10000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id JOIN loan l ON a.account_id = l.account_id WHERE t.balance > 10000"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id92"
  },
  {
    "input": {
      "text": "Calculate the average salary of clients who have taken a loan and have a credit card and have a balance of less than 0."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(d.A11) FROM loan l JOIN client c ON l.account_id = c.client_id JOIN disp d ON c.client_id = d.client_id JOIN card cc ON c.client_id = cc.disp_id JOIN trans t ON c.client_id = t.account_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id93"
  },
  {
    "input": {
      "text": "Find the top 5 districts with the highest average salary for clients who have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT d.district_id, AVG(d.A11) AS avg_salary FROM loan l JOIN client c ON l.account_id = c.client_id JOIN disp d ON c.client_id = d.client_id GROUP BY d.district_id ORDER BY avg_salary DESC LIMIT 5"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id94"
  },
  {
    "input": {
      "text": "Calculate the total amount of transactions for each type of card for clients who have taken a loan."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.type, SUM(t.amount) AS total_amount FROM loan l JOIN card c ON l.account_id = c.disp_id JOIN trans t ON c.disp_id = t.account_id GROUP BY c.type"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id95"
  },
  {
    "input": {
      "text": "Find the clients who have a credit card and have taken a loan and have a balance of less than 0 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id JOIN loan l ON a.account_id = l.account_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id96"
  },
  {
    "input": {
      "text": "Calculate the average age of clients who have taken a loan and have a credit card and have a balance of more than 10000."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(EXTRACT(YEAR FROM c.birth_date) - EXTRACT(YEAR FROM l.date)) AS avg_age FROM loan l JOIN client c ON l.account_id = c.client_id JOIN card cc ON c.client_id = cc.disp_id JOIN trans t ON c.client_id = t.account_id WHERE t.balance > 10000"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id97"
  },
  {
    "input": {
      "text": "Find the top 3 types of transactions with the highest average amount for clients who have taken a loan and have a credit card and have a balance of less than 0."
    },
    "references": [
      {
        "output": {
          "text": "SELECT t.type, AVG(t.amount) AS avg_amount FROM loan l JOIN trans t ON l.account_id = t.account_id JOIN card c ON l.account_id = c.disp_id WHERE t.balance < 0 GROUP BY t.type ORDER BY avg_amount DESC LIMIT 3"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id98"
  },
  {
    "input": {
      "text": "Calculate the total number of clients who have taken a loan and have a credit card and have a balance of less than 0 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT COUNT(DISTINCT c.client_id) FROM loan l JOIN account a ON l.account_id = a.account_id JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id99"
  },
  {
    "input": {
      "text": "Find the clients who have a credit card and have taken a loan and have a balance of more than 10000 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT c.client_id FROM account a JOIN trans t ON a.account_id = t.account_id JOIN card c ON a.account_id = c.disp_id JOIN loan l ON a.account_id = l.account_id WHERE t.balance > 10000"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id100"
  },
  {
    "input": {
      "text": "Calculate the average salary of clients who have taken a loan and have a credit card and have a balance of less than 0 and have a credit card."
    },
    "references": [
      {
        "output": {
          "text": "SELECT AVG(d.A11) FROM loan l JOIN client c ON l.account_id = c.client_id JOIN disp d ON c.client_id = d.client_id JOIN card cc ON c.client_id = cc.disp_id JOIN trans t ON c.client_id = t.account_id WHERE t.balance < 0"
        },
        "tags": [
          "correct"
        ]
      }
    ],
    "split": "test",
    "id": "id101"
  }
]