db_id stringclasses 11
values | instruction stringlengths 1.63k 14k | role stringclasses 45
values | policy unknown | input stringlengths 23 477 | output stringlengths 23 2.22k | difficulty stringclasses 3
values | metadata dict |
|---|---|---|---|---|---|---|---|
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For all disponent clients with accounts that have post-transaction issuance statements, provide a comprehensive profile including their loan statistics, transaction activity, credit card information, and categorize them based on their service usage, ranked by transaction volume. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientLoanInfo AS (\n SELECT \n d.client_id,\n d.type AS disposition_type,\n a.frequency,\n COUNT(l.loan_id) AS loan_count,\n AVG(l.amount) AS avg_loan_amount,\n SUM(CASE WHEN l.status = 'A' THEN 1 ELSE 0 END) AS active_loans,\n SUM(CASE WHEN l.s... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement. | SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1 | moderate | {
"gold_sql": "SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1",
"permission": "allowed",
"query_columns": {
"loan": [
"account_id",
"amount",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993. | SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC LIMIT 1 | moderate | {
"gold_sql": "SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC LIMIT 1",
"permission": "allowed",
"query_columns": {
"loan": [
"account_id",
"amount",
"duration"... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the average age at account opening, total number with loans, number with successfully completed loans, and number currently in debt for female clients born before 1950 from Sokolov who own accounts? Also, what are the earliest and latest years these accounts were opened? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH female_clients_from_sokolov AS (\n SELECT \n c.client_id,\n c.birth_date,\n STRFTIME('%Y', c.birth_date) AS birth_year,\n d.A2 AS district_name\n FROM \n client c\n INNER JOIN \n district d ON c.district_id = d.district_id\n WHERE \n c.g... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | List out the accounts who have the earliest trading date in 1995 ? | SELECT DISTINCT account_id
FROM trans
WHERE STRFTIME('%Y', date) = '1995'
AND date = (SELECT MIN(date) FROM trans WHERE STRFTIME('%Y', date) = '1995')
ORDER BY account_id ASC; | simple | {
"gold_sql": "SELECT DISTINCT account_id\nFROM trans\nWHERE STRFTIME('%Y', date) = '1995'\n AND date = (SELECT MIN(date) FROM trans WHERE STRFTIME('%Y', date) = '1995')\nORDER BY account_id ASC;",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id"
]
},
"missing_columns": {},
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | State different accounts who have account opening date before 1997 and own an amount of money greater than 3000USD | SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) < '1997' AND T1.amount > 3000 | simple | {
"gold_sql": "SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) < '1997' AND T1.amount > 3000",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id",
"amount"
],
"account": [
"account... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For all clients who received their credit card on March 3rd, 1994, provide a comprehensive profile including their personal information, banking activity, loan history, and district characteristics. Categorize them as borrowers based on their age and loan status, and rank them by age within their gender group. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientCardInfo AS (\n SELECT \n c.client_id,\n c.gender,\n c.birth_date,\n cd.issued,\n cd.type AS card_type,\n STRFTIME('%Y', c.birth_date) AS birth_year,\n STRFTIME('%Y', cd.issued) - STRFTIME('%Y', c.birth_date) AS age_at_card_issue\n FROM ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the transaction of 840 on October 14, 1998, provide detailed information about the account including when it was opened, how long it had been open, the account owner's gender and age at the time, the total number of transactions up to that date, how many cards were issued, and whether the account had a loan before ... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH TransactionDetails AS (\n SELECT \n t.account_id,\n t.amount,\n t.date AS transaction_date,\n t.type,\n t.operation,\n t.balance,\n t.k_symbol,\n a.date AS account_opening_date,\n a.frequency,\n d.district_id,\n d.A2 A... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the loan approved on August 25, 1994, provide a comprehensive profile including: the district information (name, region, average salary rank, unemployment rank), how long the account was open before the loan, the demographics of clients in that district (total count, gender breakdown, average age), and the account'... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanAccounts AS (\n SELECT \n T2.account_id,\n T2.date AS loan_date,\n T1.district_id,\n T1.date AS account_open_date,\n JULIANDAY(T2.date) - JULIANDAY(T1.date) AS days_since_account_opened\n FROM \n account AS T1 \n INNER JOIN \n loan AS T... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the client who received a credit card on October 21, 1996, what are the complete details of their largest transaction, including their personal information, district details, and any associated loans or orders? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH TransactionStats AS (\n SELECT \n T4.account_id,\n T4.trans_id,\n T4.amount,\n T4.type,\n T4.date,\n T4.balance,\n RANK() OVER (PARTITION BY T4.account_id ORDER BY T4.amount DESC) as amount_rank\n FROM trans AS T4\n),\nClientCards AS (\n SE... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the gender of the oldest client who opened his/her account in the highest average salary branch? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T2.gender FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id ORDER BY T1.A11 DESC, T2.birth_date ASC LIMIT 1",
"permission": "denied",
"query_columns": {
"client": [
"birth_date",
"district_id",
"gender"
],
"district": [
"A11",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account? | WITH max_loan_account AS (
SELECT l.account_id, a.date AS account_open_date
FROM loan l
JOIN account a ON l.account_id = a.account_id
ORDER BY l.amount DESC
LIMIT 1
)
SELECT t.amount
FROM trans t
JOIN max_loan_account m ON t.account_id = m.account_id
WHERE t.date >= m.account_open_date
ORDER BY t.da... | simple | {
"gold_sql": "WITH max_loan_account AS (\n SELECT l.account_id, a.date AS account_open_date\n FROM loan l\n JOIN account a ON l.account_id = a.account_id\n ORDER BY l.amount DESC\n LIMIT 1\n)\nSELECT t.amount\nFROM trans t\nJOIN max_loan_account m ON t.account_id = m.account_id\nWHERE t.date >= m.acco... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many clients opened their accounts in Jesenik branch were women? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT COUNT(DISTINCT client.client_id)\nFROM client\nINNER JOIN disp ON client.client_id = disp.client_id\nINNER JOIN account ON disp.account_id = account.account_id\nINNER JOIN district ON account.district_id = district.district_id\nWHERE client.gender = 'F' AND district.A2 = 'Jesenik' AND disp.type ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the disposition id of the client who made 5100 USD transaction in 1998/9/2? | SELECT T1.disp_id FROM disp AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.date='1998-09-02' AND T3.amount = 5100 | simple | {
"gold_sql": "SELECT T1.disp_id FROM disp AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.date='1998-09-02' AND T3.amount = 5100",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id",
"amount",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the comprehensive statistics for accounts opened in Litomerice in 1996, including client demographics, transaction activity, loan information, and quarterly distribution of account openings? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsInLitomerice1996 AS (\n SELECT \n T2.account_id,\n T2.date,\n T1.A2 AS district_name,\n STRFTIME('%m', T2.date) AS month_opened\n FROM \n district AS T1 \n INNER JOIN \n account AS T2 ON T1.district_id = T2.district_id \n WHERE \n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the female client born on January 29, 1976, provide a comprehensive analysis of all her owned accounts including their locations, transaction activity, financial products, and regional economic indicators. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH female_client AS (\n SELECT \n c.client_id, \n c.birth_date, \n c.district_id,\n d.A2 AS district_name\n FROM client c\n JOIN district d ON c.district_id = d.district_id\n WHERE c.birth_date = '1976-01-29' AND c.gender = 'F'\n),\nclient_accounts AS (\n SE... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the client who applied for a 98832 USD loan on January 3rd, 1996, provide a comprehensive profile including their birthday, age at the time of loan application, location, transaction history before the loan, expense-to-income ratio, balance range, credit card information, and number of previous loans. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanClient AS (\n SELECT \n T1.loan_id,\n T1.account_id,\n T1.date AS loan_date,\n T1.amount,\n T1.duration,\n T1.payments,\n T1.status,\n T4.client_id,\n T4.birth_date,\n T4.gender,\n T4.district_id AS client_district... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the first client who opened his/her account in Prague, what is his/her account ID? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T1.account_id\nFROM account AS T1\nINNER JOIN district AS T2 ON T1.district_id = T2.district_id\nWHERE T2.A3 = 'Prague'\nORDER BY T1.date ASC\nLIMIT 1;",
"permission": "denied",
"query_columns": {
"district": [
"A3",
"district_id"
],
"account": [
"account_id",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the district name, number of inhabitants, total number of clients, number of male clients, and percentage of male clients for the most populated district in the south Bohemia region? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH RegionStats AS (\n SELECT \n d.district_id,\n d.A3 AS region,\n CAST(d.A4 AS INTEGER) AS inhabitants,\n COUNT(DISTINCT c.client_id) AS total_clients,\n SUM(CASE WHEN c.gender = 'M' THEN 1 ELSE 0 END) AS male_clients,\n RANK() OVER (PARTITION BY d.A3 ORD... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the client whose loan was approved first in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27? | SELECT CAST((SUM(IIF(T3.date = '1998-12-27', T3.balance, 0)) - SUM(IIF(T3.date = '1993-03-22', T3.balance, 0))) AS REAL) * 100 / SUM(IIF(T3.date = '1993-03-22', T3.balance, 0)) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T3.account_id = T2.account_id WHERE T1.date... | challenging | {
"gold_sql": "SELECT CAST((SUM(IIF(T3.date = '1998-12-27', T3.balance, 0)) - SUM(IIF(T3.date = '1993-03-22', T3.balance, 0))) AS REAL) * 100 / SUM(IIF(T3.date = '1993-03-22', T3.balance, 0)) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T3.account_id = T2.account... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For each region, what percentage of the total loan amount has been fully paid without issues, and what percentage of loans were successfully completed? Also include the average interest paid on successful loans compared to all loans. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoansByDistrict AS (\n SELECT \n d.A2 AS district_name,\n d.A3 AS region,\n l.status,\n l.amount,\n l.duration,\n l.payments,\n a.frequency,\n strftime('%Y', l.date) AS loan_year,\n CASE \n WHEN c.gender = 'M' THEN 'Male'... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For loans under $100,000, what is the percentage of loans running with no issues in each region and loan size category, and how does each region's performance compare to the overall average? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanStatusByRegion AS (\n SELECT \n d.A3 AS region,\n l.status,\n l.amount,\n l.duration,\n CASE \n WHEN l.status = 'C' THEN 1\n ELSE 0\n END AS is_running_ok,\n CASE \n WHEN l.amount < 50000 THEN 'Small'\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts opened in 1993 with statements issued after transactions, provide a comprehensive analysis including district information, transaction activity, client demographics, loan details, and risk assessment. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsIn1993 AS (\n SELECT \n T1.account_id, \n T1.district_id,\n T1.date AS account_open_date\n FROM account AS T1 \n WHERE T1.frequency = 'POPLATEK PO OBRATU' \n AND STRFTIME('%Y', T1.date) = '1993'\n),\nAccountStats AS (\n SELECT \n a.account_id,\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000'",
"permission": "denied",
"query_columns": {
"district": [
"A3",
"district_id"
],... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts opened in Prachatice district, provide a comprehensive financial profile including account details, owner demographics, transaction statistics, loan information, customer categorization, and rank them by net balance from highest to lowest. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsInPrachatice AS (\n SELECT a.account_id, a.date, a.district_id\n FROM account AS a\n INNER JOIN district AS d ON a.district_id = d.district_id\n WHERE d.A2 = 'Prachatice'\n),\nClientsWithPrachaticeAccounts AS (\n SELECT c.client_id, c.gender, c.birth_date, d.disp_id, d.accou... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For loan ID 4990, provide a comprehensive profile including the borrower's demographics, loan details with status description, district economic indicators, and how this loan ranks among other loans in the same district. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanStats AS (\n SELECT \n l.loan_id,\n l.account_id,\n l.amount,\n l.duration,\n l.status,\n CASE\n WHEN l.status = 'A' THEN 'Running - OK'\n WHEN l.status = 'B' THEN 'Running - Issues'\n WHEN l.status = 'C' THEN 'Finished - No Issues'\n WHEN l.status = 'D' ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts with loans exceeding $300,000 in districts where the average salary is above the national average, show me the account details including district, region, loan statistics, account owner demographics, income classification, transaction activity, savings ratio, and how they rank within their region by maximu... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanStatistics AS (\n SELECT \n account_id,\n AVG(amount) AS avg_loan_amount,\n MAX(amount) AS max_loan_amount,\n COUNT(*) AS loan_count\n FROM loan\n GROUP BY account_id\n HAVING MAX(amount) > 300000\n),\nClientDetails AS (\n SELECT \n c.client_id... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For 60-month loans, show me the top 3 largest loans in each district, including the district's average salary, loan details, client demographics, transaction history, and calculated interest rate. Order the results by highest average salary and loan amount. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanStatistics AS (\n SELECT \n T3.loan_id,\n T2.A2 AS district_name,\n T2.A11 AS avg_salary,\n T3.amount,\n T3.duration,\n T3.payments,\n T3.status,\n T3.account_id,\n ROW_NUMBER() OVER (PARTITION BY T2.A2 ORDER BY T3.amount DESC) AS district_loan_rank\n FROM account ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For loan contracts which are still running where clients are in debt, list the district and state the percentage unemployment rate increment from 1995 to 1996. | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT DISTINCT T3.A2 AS district_name, CAST((T3.A13 - T3.A12) AS REAL) * 100 / NULLIF(T3.A12,0) AS unemployment_increment FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.status = 'D' ORDER BY district_name ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts opened in 1993, provide a monthly breakdown showing the percentage of accounts from Decin district, average transaction statistics, and indicate whether each month's Decin percentage is above, below, or equal to the overall yearly average. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsOpenedIn1993 AS (\n SELECT \n a.account_id,\n a.district_id,\n d.A2 AS district_name,\n STRFTIME('%m', a.date) AS opening_month\n FROM \n account a\n JOIN \n district d ON a.district_id = d.district_id\n WHERE \n STRFTIME('%Y', a... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts with monthly statement issuance, provide a comprehensive financial profile including client demographics, transaction activity, loan details, and rankings by transaction volume and cash flow performance. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH MonthlyAccounts AS (\n SELECT \n account_id, \n district_id, \n date AS account_open_date\n FROM \n account \n WHERE \n frequency = 'POPLATEK MESICNE'\n),\nAccountTransactions AS (\n SELECT \n ma.account_id,\n COUNT(t.trans_id) AS transaction_count,\n SUM(CASE WHEN t.ty... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | List the top nine districts, by descending order, from the highest to the lowest, the number of female account holders. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T2.A2, COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' GROUP BY T2.district_id, T2.A2 ORDER BY COUNT(T1.client_id) DESC LIMIT 9",
"permission": "denied",
"query_columns": {
"client": [
"client_id",
"dist... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Which are the top ten withdrawals (non-credit card) by district names for the month of January 1996? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT \n T1.A2 AS district_name, \n SUM(T3.amount) AS total_non_credit_withdrawals \nFROM district AS T1\nINNER JOIN account AS T2 ON T1.district_id = T2.district_id\nINNER JOIN trans AS T3 ON T2.account_id = T3.account_id\nWHERE \n T3.type = 'VYDAJ' \n AND T3.date LIKE '1996-01%' \nGRO... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many of the account holders in South Bohemia still do not own credit cards? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(T3.account_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.client_id = T3.client_id WHERE T1.A3 = 'south Bohemia' AND T3.type != 'OWNER'",
"permission": "denied",
"query_columns": {
"disp": [
"account_id",
"... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Which district has highest active loan? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1",
"permission": "denied",
"query_columns": {
"district": [
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the average loan amount by male borrowers? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT AVG(T4.amount) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN loan AS T4 ON T3.account_id = T4.account_id WHERE T1.gender = 'M'",
"permission": "denied",
"query_columns": {
"disp": [
"accou... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | In 1996, which districts have the highest unemployment rate? List their branch location and district name. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT district_id, A2 FROM district WHERE A13 = (SELECT A13 FROM district ORDER BY A13 DESC LIMIT 1)",
"permission": "denied",
"query_columns": {
"district": [
"A13",
"A2",
"district_id"
]
},
"missing_columns": {
"district": [
"A13",
"A2",
"distr... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the district with the highest number of crimes in 1996, provide details including the district name, region, population, number of crimes, percentage increase in crimes from 1995 to 1996, and how many accounts were opened there. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH CrimeStats AS (\n SELECT \n district_id,\n A16 AS crimes_1996,\n RANK() OVER (ORDER BY A16 DESC) AS crime_rank\n FROM district\n),\nAccountsByDistrict AS (\n SELECT \n a.district_id,\n COUNT(a.account_id) AS account_count,\n AVG(JULIANDAY('1996-12... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts with monthly issuance that went into negative balance after a credit card withdrawal, what are the statistics including average negative balance, maximum withdrawal amount, average number of cards per account, total gold cards, average owner age, and gender distribution of account owners? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountWithNegativeBalance AS (\n SELECT \n t.account_id,\n t.date AS transaction_date,\n t.balance,\n t.operation,\n t.amount,\n a.frequency,\n ROW_NUMBER() OVER (PARTITION BY t.account_id ORDER BY t.date DESC) AS rn\n FROM \n trans t\... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved? | SELECT COUNT(T1.account_id)
FROM account AS T1
INNER JOIN loan AS T2 ON T1.account_id = T2.account_id
WHERE T2.date BETWEEN '1995-01-01' AND '1997-12-31'
AND T1.frequency = 'POPLATEK MESICNE'
AND T2.amount >= 250000; | moderate | {
"gold_sql": "SELECT COUNT(T1.account_id)\nFROM account AS T1\nINNER JOIN loan AS T2 ON T1.account_id = T2.account_id\nWHERE T2.date BETWEEN '1995-01-01' AND '1997-12-31'\n AND T1.frequency = 'POPLATEK MESICNE'\n AND T2.amount >= 250000;",
"permission": "allowed",
"query_columns": {
"account": [
"acc... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the demographics and financial statistics of account owners with running loan contracts in district 1, including their average remaining debt, gender distribution, age, card ownership, transaction activity, and account balances? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsWithRunningLoans AS (\n SELECT \n a.account_id,\n a.district_id,\n l.status,\n l.amount,\n l.duration,\n l.payments,\n (l.amount - (l.payments * l.duration)) AS remaining_debt\n FROM account AS a\n INNER JOIN loan AS l ON a.account_... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the district with the second-highest number of crimes committed in 1995, provide a comprehensive breakdown of all male clients including their total count, the crime count for that year, total accounts, loans, credit cards, average dispositions per client, number of clients with loans, and age distribution across y... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH CrimeRanking AS (\n SELECT \n district_id,\n A15,\n RANK() OVER (ORDER BY A15 DESC) as crime_rank\n FROM district\n),\nSecondHighestCrimeDistrict AS (\n SELECT district_id, A15\n FROM CrimeRanking\n WHERE crime_rank = 2\n),\nClientStats AS (\n SELECT \n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the demographic and financial profile of gold credit card owners with account balances averaging over 1,000, broken down by gender? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH gold_owner_cards AS (\n SELECT \n c.card_id,\n c.disp_id,\n c.type AS card_type,\n c.issued,\n d.account_id,\n d.client_id,\n d.type AS disp_type\n FROM card AS c\n INNER JOIN disp AS d ON c.disp_id = d.disp_id\n WHERE c.type = 'gold' AN... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the comprehensive financial profile of all accounts in the Pisek district, including the total number of accounts, average transactions per account, total deposits and withdrawals, average maximum balance, total credit cards issued, total loans issued, percentage of active loan amounts, and number of unique acc... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH PisekAccounts AS (\n SELECT \n a.account_id, \n a.district_id,\n a.frequency,\n a.date,\n d.A2 AS district_name\n FROM account AS a\n INNER JOIN district AS d ON a.district_id = d.district_id\n WHERE d.A2 = 'Pisek'\n),\nAccountStats AS (\n SELECT \... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Which districts have transactions greater than USD$10,000 in 1997? | SELECT district_id
FROM account AS T1
INNER JOIN trans AS T3 ON T1.account_id = T3.account_id
WHERE STRFTIME('%Y', T3.date) = '1997'
GROUP BY district_id
HAVING SUM(T3.amount) > 10000 | simple | {
"gold_sql": "SELECT district_id\nFROM account AS T1\nINNER JOIN trans AS T3 ON T1.account_id = T3.account_id\nWHERE STRFTIME('%Y', T3.date) = '1997'\nGROUP BY district_id\nHAVING SUM(T3.amount) > 10000",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id",
"amount",
"date"
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Which accounts placed orders for household payment in Pisek? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.k_symbol = 'SIPO' AND T3.A2 = 'Pisek'",
"permission": "denied",
"query_columns": {
"trans": [
"account_id",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For each account with gold credit cards, provide a comprehensive financial profile including the number of gold cards, location details, transaction history, balance statistics, loan information, and rank the accounts by their average balance. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH GoldCardAccounts AS (\n SELECT \n T2.account_id,\n COUNT(T1.card_id) AS gold_card_count\n FROM disp AS T2 \n INNER JOIN card AS T1 ON T1.disp_id = T2.disp_id \n WHERE T1.type = 'gold'\n GROUP BY T2.account_id\n),\nAccountDetails AS (\n SELECT \n a.account_i... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the breakdown of credit card transaction patterns in 1998 by region, district, gender, and card type, including average transaction amounts, total spending, and how these amounts compare to district average salaries? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH CardHolders AS (\n SELECT \n c.client_id,\n c.gender,\n d.disp_id,\n d.account_id,\n a.district_id,\n cd.type AS card_type,\n cd.issued AS card_issue_date\n FROM client c\n JOIN disp d ON c.client_id = d.client_id\n JOIN card cd ON d.dis... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Who are the account holder identification numbers whose who have transactions on the credit card with the amount is less than the average, in 1998? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT DISTINCT T1.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1998' AND T1.operation = 'VYBER KARTOU' AND T1.amount < (SELECT AVG(amount) FROM trans WHERE STRFTIME('%Y', date) = '1998')",
"permission": "denied",
"query_colu... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the top 100 female account owners with credit cards and loans, ranked by their total loan amounts, showing their financial profile including card details, loan status, transaction statistics, savings rate, and regional loan ranking? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountOwners AS (\n SELECT \n T1.client_id,\n T1.gender,\n T1.birth_date,\n T2.account_id,\n T2.disp_id,\n T5.district_id,\n T5.frequency\n FROM client AS T1\n INNER JOIN disp AS T2 ON T1.client_id = T2.client_id\n INNER JOIN account AS... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the demographic and financial profile of female account owners in south Bohemia, broken down by district and age group, including their average transaction activity, net balance, loan amounts, and active loan rates? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientAccounts AS (\n SELECT \n c.client_id,\n c.gender,\n a.account_id,\n d.A3 AS region,\n d.A2 AS district_name,\n CASE \n WHEN c.birth_date > '1980-01-01' THEN 'Young'\n WHEN c.birth_date BETWEEN '1960-01-01' AND '1980-01-01' T... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For account owners in the Tabor district, provide a comprehensive customer profile including their demographics, transaction history, loan history, credit status, and customer priority ranking based on average balance. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH EligibleAccounts AS (\n SELECT \n T2.account_id,\n T2.district_id,\n T2.date AS account_open_date,\n T1.A2 AS district_name,\n T3.client_id\n FROM district AS T1 \n INNER JOIN account AS T2 ON T1.district_id = T2.district_id \n INNER JOIN disp AS T3 O... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Please list the account types that are not eligible for loans, and the average income of residents in the district where the account is located exceeds $8000 but is no more than $9000. | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT DISTINCT T3.type FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type != 'OWNER' AND T1.A11 BETWEEN 8000 AND 9000",
"permission": "denied",
"query_columns": {
"disp": [
"account_id",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many accounts in North Bohemia has made a transaction with the partner's bank being AB? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.bank = 'AB' AND T1.A3 = 'north Bohemia'",
"permission": "denied",
"query_columns": {
"trans": [
"account_id",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For each district with withdrawal transactions, provide a comprehensive analysis including the total number and amount of withdrawals, demographic information, withdrawal per capita, and rank the districts by total withdrawal amount. Also categorize each district by unemployment level. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH district_withdrawal_counts AS (\n SELECT \n T1.district_id,\n T1.A2 AS district_name,\n COUNT(DISTINCT T3.trans_id) AS withdrawal_count,\n SUM(T3.amount) AS total_withdrawal_amount,\n AVG(T3.amount) AS avg_withdrawal_amount\n FROM district AS T1 \n INNER... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the average number of crimes committed in 1995 in regions where the number exceeds 4000 and the region has accounts that are opened starting from the year 1997? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT AVG(sub.A15) AS avg_crimes_1995\nFROM (\n SELECT DISTINCT\n T1.district_id,\n T1.A15\n FROM district AS T1\n INNER JOIN account AS T2 ON T1.district_id = T2.district_id\n WHERE STRFTIME('%Y', T2.date) >= '1997'\n AND T1.A15 > 4000\n) AS sub;",
"permission": "denied",
"query_colu... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For each district, how many classic credit card holders who are account owners are there, and what are their average loan amounts, account balances, loan performance, district salary, and unemployment rate? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH loan_stats AS (\n SELECT \n l.account_id,\n COUNT(l.loan_id) AS loan_count,\n AVG(l.amount) AS avg_loan_amount,\n SUM(CASE WHEN l.status = 'A' THEN 1 ELSE 0 END) AS good_loans,\n SUM(CASE WHEN l.status = 'B' THEN 1 ELSE 0 END) AS bad_loans\n FROM loan l\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the financial profile and banking behavior of male clients in Prague district, broken down by age groups (Young, Middle-aged, and Senior)? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH PrahaClients AS (\n SELECT \n c.client_id,\n c.gender,\n c.birth_date,\n d.A2 AS district_name,\n CASE \n WHEN strftime('%Y', 'now') - strftime('%Y', c.birth_date) - (strftime('%m-%d', 'now') < strftime('%m-%d', c.birth_date)) < 30 THEN 'Young'\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What percentage of gold credit cards were issued before 1998, both overall and broken down by region? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH GoldCardStats AS (\n SELECT \n c.card_id,\n STRFTIME('%Y', c.issued) AS issue_year,\n d.account_id,\n CASE WHEN STRFTIME('%Y', c.issued) < '1998' THEN 1 ELSE 0 END AS is_pre_1998\n FROM card c\n JOIN disp d ON c.disp_id = d.disp_id\n WHERE c.type = 'gold'\n)... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the demographic, financial, and transaction details of the account owner who has the largest loan amount, including their age category, savings rate, and the economic status of their district? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanRanking AS (\n SELECT \n l.account_id,\n l.amount,\n l.loan_id,\n RANK() OVER (ORDER BY l.amount DESC) as loan_rank\n FROM loan l\n),\nAccountOwners AS (\n SELECT \n d.client_id,\n d.account_id,\n c.gender,\n c.birth_date,\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For account 532, what is the crime trend and ranking of its district, including the percentage change in crimes between 1995 and 1996, how many loans and transactions the account has, and how it compares to the average crime rate across all districts? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH CrimesByDistrict AS (\n SELECT \n d.district_id,\n d.A2 AS district_name,\n d.A15 AS crimes_1995,\n d.A16 AS crimes_1996,\n CASE \n WHEN d.A16 > d.A15 THEN 'Increased'\n WHEN d.A16 < d.A15 THEN 'Decreased'\n ELSE 'Unchanged'\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the account that placed order 33333, provide a comprehensive profile including the district's economic ranking by salary, account transaction history, ownership details, loan status, and order information. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH OrderInfo AS (\n SELECT \n T1.order_id,\n T1.account_id,\n T1.amount AS order_amount,\n T1.k_symbol AS order_purpose,\n T2.district_id,\n T2.date AS account_creation_date\n FROM `order` AS T1\n INNER JOIN account AS T2 ON T1.account_id = T2.accoun... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | List all the withdrawals in cash transactions that the client with the id 3356 makes. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T4.trans_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 3356 AND T4.operation = 'VYBER'",
"permission": "denied",
"query_columns":... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Among the weekly issuance accounts, how many have a loan of under 200000? | SELECT COUNT(T1.account_id)
FROM loan AS T1
INNER JOIN account AS T2 ON T1.account_id = T2.account_id
WHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000; | simple | {
"gold_sql": "SELECT COUNT(T1.account_id)\nFROM loan AS T1\nINNER JOIN account AS T2 ON T1.account_id = T2.account_id\nWHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000;",
"permission": "allowed",
"query_columns": {
"loan": [
"account_id",
"amount"
],
"account": [
"accoun... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the complete customer profile for client 13539, including their demographics, credit card details, district information with salary ranking, transaction activity, customer segment classification, and loan count? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH client_account_info AS (\n SELECT\n d.client_id,\n d.account_id,\n d.disp_id,\n c.gender,\n c.birth_date,\n CAST(strftime('%Y', 'now') AS INTEGER) - CAST(strftime('%Y', c.birth_date) AS INTEGER) AS client_age,\n a.district_id,\n a.frequenc... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For client 3541, what are the complete financial details of all their accounts including region, loan information, transaction statistics, net balance, and how many other clients are in the same region, ordered by account activity? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientRegionInfo AS (\n SELECT \n c.client_id,\n d.district_id,\n d.A2 AS district_name,\n d.A3 AS region,\n d.A11 AS avg_salary,\n d.A12 AS unemployment_rate_1995\n FROM \n client AS c\n INNER JOIN \n district AS d ON c.district_id ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Which district has the most accounts with loan contracts finished with no problems? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.A2\nFROM District AS T1\nINNER JOIN Account AS T2 ON T1.District_id = T2.District_id\nINNER JOIN Loan AS T3 ON T2.Account_id = T3.Account_id\nWHERE T3.status = 'A'\nGROUP BY T1.District_id\nORDER BY COUNT(T2.Account_id) DESC\nLIMIT 1;",
"permission": "denied",
"query_columns": {
"dist... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For order 32423, provide a comprehensive profile of the account owner including their demographics, order details, loan status, transaction history, and number of credit cards. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH client_info AS (\n SELECT \n c.client_id,\n c.gender,\n CAST(strftime('%Y', 'now') - strftime('%Y', c.birth_date) AS INTEGER) AS age,\n d.A2 AS district_name,\n d.A3 AS region\n FROM client c\n JOIN district d ON c.district_id = d.district_id\n),\norder_details AS (\n SELECT \n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Please list all the transactions made by accounts from district 5. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T3.trans_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T1.district_id = 5",
"permission": "denied",
"query_columns": {
"trans": [
"account_id",
"trans_id"
],
"district":... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the comprehensive banking activity profile for accounts in Jesenik district, including the total number of accounts, transaction patterns, loan statistics with their repayment status, average balances, and the gender distribution of clients? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH district_accounts AS (\n SELECT \n d.district_id,\n d.A2 AS district_name,\n a.account_id,\n a.date AS account_creation_date,\n COUNT(l.loan_id) AS loan_count,\n SUM(CASE WHEN l.status = 'A' THEN 1 ELSE 0 END) AS good_loans,\n SUM(CASE WHEN l.status = 'B' THEN 1 ELSE 0 END) A... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | List all the clients' IDs whose junior credit cards were issued after 1996. | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T2.client_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'junior' AND T1.issued >= '1997-01-01'",
"permission": "denied",
"query_columns": {
"card": [
"disp_id",
"issued",
"type"
],
"disp": [
"client_id",
"disp_id... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT CAST(SUM(T2.gender = 'F') AS REAL) * 100 / COUNT(T2.client_id)\nFROM district AS T1\nINNER JOIN client AS T2 ON T1.district_id = T2.district_id\nWHERE T1.A11 > 10000;",
"permission": "denied",
"query_columns": {
"client": [
"client_id",
"district_id",
"gender"
],
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997? | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) -\n SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 /\n SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)\nFROM loan AS T1\nINNER JO... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many credit card withdrawals were recorded after 1995? | SELECT COUNT(account_id) FROM trans WHERE STRFTIME('%Y', date) > '1995' AND operation = 'VYBER KARTOU' | simple | {
"gold_sql": "SELECT COUNT(account_id) FROM trans WHERE STRFTIME('%Y', date) > '1995' AND operation = 'VYBER KARTOU'",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id"
]
},
"missing_columns": {},
"reason": "All required columns are permitted",
"question_id": 170,
"evide... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What was the difference in the number of crimes committed in East and North Bohemia in 1996? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT SUM(IIF(A3 = 'north Bohemia', A16, 0)) - SUM(IIF(A3 = 'east Bohemia', A16, 0)) FROM district",
"permission": "denied",
"query_columns": {
"district": [
"A16",
"A3"
]
},
"missing_columns": {
"district": [
"A16",
"A3"
]
},
"reason": "Missing colu... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many owner and disponent dispositions are there from account number 1 to account number 10? | SELECT SUM(type = 'OWNER') , SUM(type = 'DISPONENT') FROM disp WHERE account_id BETWEEN 1 AND 10 | simple | {
"gold_sql": "SELECT SUM(type = 'OWNER') , SUM(type = 'DISPONENT') FROM disp WHERE account_id BETWEEN 1 AND 10",
"permission": "allowed",
"query_columns": {
"disp": [
"account_id"
]
},
"missing_columns": {},
"reason": "All required columns are permitted",
"question_id": 172,
"evidence": "... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total? | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT T1.frequency, T2.k_symbol FROM account AS T1 INNER JOIN (SELECT account_id, k_symbol, SUM(amount) AS total_amount FROM `order` GROUP BY account_id, k_symbol) AS T2 ON T1.account_id = T2.account_id WHERE T1.account_id = 3 AND T2.total_amount = 3539",
"permission": "denied",
"query_columns": {... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What year was account owner number 130 born? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT STRFTIME('%Y', T1.birth_date) FROM client AS T1 INNER JOIN disp AS T3 ON T1.client_id = T3.client_id INNER JOIN account AS T2 ON T3.account_id = T2.account_id WHERE T2.account_id = 130",
"permission": "denied",
"query_columns": {
"disp": [
"account_id",
"client_id"
],
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts with owner disposition that request statements after each transaction, what are the regional and district-level statistics including the number of accounts, average district salary, loan adoption rate, average loan amount, transaction activity, and account balances? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH owner_accounts AS (\n SELECT DISTINCT a.account_id, a.district_id, a.frequency, a.date\n FROM account a\n JOIN disp d ON a.account_id = d.account_id\n WHERE d.type = 'OWNER' AND a.frequency = 'POPLATEK PO OBRATU'\n),\ndistrict_stats AS (\n SELECT \n d.district_id,\n d.... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the amount of debt that client number 992 has, and how is this client doing with payments? | SELECT T4.amount, T4.status FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 on T2.account_id = T3.account_id INNER JOIN loan AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 992 | simple | {
"gold_sql": "SELECT T4.amount, T4.status FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 on T2.account_id = T3.account_id INNER JOIN loan AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 992",
"permission": "allowed",
"query_columns": {
"disp": [
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT T4.balance, T1.gender FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id =T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 4 AND T4.trans_id = 851",
"permission": "denied",
"query_columns"... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the complete details of client number 9 including their gender, birth date, credit card type, when the card was issued, customer status, total number of accounts owned, and how long they've had their most recent card? | Sorry, I cannot answer. | challenging | {
"gold_sql": "SELECT \n cl.client_id,\n cl.gender,\n DATE(cl.birth_date) AS birth_date,\n cd.type AS card_type,\n DATE(cd.issued) AS card_issued_date,\n CASE \n WHEN cd.type = 'gold' THEN 'Premium Customer'\n WHEN cd.type = 'classic' THEN 'Regular Customer'\n ELSE 'Other Custom... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How much, in total, did client number 617 pay for all of the transactions in 1998? | SELECT SUM(T2.amount) FROM disp AS T1 INNER JOIN trans AS T2 ON T2.account_id = T1.account_id WHERE STRFTIME('%Y', T2.date) = '1998' AND T1.client_id = 617 | simple | {
"gold_sql": "SELECT SUM(T2.amount) FROM disp AS T1 INNER JOIN trans AS T2 ON T2.account_id = T1.account_id WHERE STRFTIME('%Y', T2.date) = '1998' AND T1.client_id = 617",
"permission": "allowed",
"query_columns": {
"trans": [
"account_id",
"amount",
"date"
],
"disp": [
"accou... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Please provide a list of clients who were born between 1983 and 1987 and whose account branch is in East Bohemia, along with their IDs. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.client_id, T3.account_id\nFROM client AS T1\nINNER JOIN district AS T2 ON T1.district_id = T2.district_id\nINNER JOIN disp AS T4 ON T1.client_id = T4.client_id\nINNER JOIN account AS T3 ON T2.district_id = T3.district_id AND T4.account_id = T3.account_id\nWHERE T2.A3 = 'east Bohemia' AND STRF... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For the top 3 female clients with the largest loans, what are their loan details including total payments, interest paid, loan status, location, transaction activity, income category, and age? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH client_loans AS (\n SELECT \n c.client_id,\n c.gender,\n d.account_id,\n l.loan_id,\n l.amount,\n l.duration,\n l.payments,\n l.status,\n a.district_id,\n di.A2 AS district_name,\n di.A3 AS region,\n RANK() OVER... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many male customers who were born between 1974 and 1976 have made a payment on their home in excess of $4000? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(T1.account_id) FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T4 ON T2.account_id = T4.account_id INNER JOIN client AS T3 ON T4.client_id = T3.client_id WHERE STRFTIME('%Y', T3.birth_date) BETWEEN '1974' AND '1976' AND T3.gender = 'M' AND T1.a... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts opened in Beroun after 1996, what are the yearly statistics including account owner demographics, transaction volumes, loan performance, and credit card distribution? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsInBeroun AS (\n SELECT \n a.account_id,\n a.date,\n d.A2 AS district_name,\n STRFTIME('%Y', a.date) AS opening_year,\n a.frequency\n FROM \n account AS a\n INNER JOIN \n district AS d ON a.district_id = d.district_id\n WHERE \n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | How many female customers have a junior credit card? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.gender = 'F' AND T3.type = 'junior'",
"permission": "denied",
"query_columns": {
"disp": [
"client_id",
"disp_id"
],
"c... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What proportion of customers who have accounts at the Prague branch are female? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT CAST(SUM(T2.gender = 'F') AS REAL) / COUNT(T2.client_id) * 100\nFROM district AS T1\nINNER JOIN client AS T2 ON T1.district_id = T2.district_id\nWHERE T1.A3 = 'Prague';",
"permission": "denied",
"query_columns": {
"client": [
"client_id",
"district_id",
"gender"
],
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What percentage of male clients request for weekly statements to be issued? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN account AS T2 ON T2.district_id = T1.district_id INNER JOIN disp as T3 on T1.client_id = T3.client_id AND T2.account_id = T3.account_id WHERE T2.frequency = 'POPLATEK TYDNE'",
"permission": "denied",
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the key statistics for account owners with weekly statement issuance, including how many owners there are, their average number of transactions, how many have credit cards, how many are high-volume clients with over 10,000 in total transactions, the number of districts they're located in, and their average acc... | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientTransactionStats AS (\n SELECT \n T2.client_id,\n COUNT(DISTINCT T3.trans_id) AS transaction_count,\n SUM(T3.amount) AS total_transaction_amount,\n AVG(T3.balance) AS avg_balance\n FROM account AS T1\n JOIN disp AS T2 ON T2.account_id = T1.account_id\n ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | For accounts with loans exceeding 24 months duration that were opened before 1997, provide comprehensive details about the account(s) with the smallest loan amount, including transaction history, card information, client demographics, and order activity. | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH AccountsWithLongLoans AS (\n SELECT \n l.account_id,\n l.amount,\n l.duration,\n a.date AS account_opening_date,\n STRFTIME('%Y', a.date) AS opening_year,\n d.district_id,\n d.A2 AS district_name,\n d.A3 AS region\n FROM \n loan ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Name the account numbers of female clients who are oldest and have lowest average salary? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T3.account_id\nFROM client AS T1\nINNER JOIN district AS T2 ON T1.district_id = T2.district_id\nINNER JOIN account AS T3 ON T2.district_id = T3.district_id\nINNER JOIN disp AS T4 ON T1.client_id = T4.client_id AND T4.account_id = T3.account_id\nWHERE T1.gender = 'F'\nORDER BY T1.birth_date ASC, ... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the comprehensive statistics for clients born in 1920 who live in east Bohemia, including their account activity, loan information, transaction patterns, gender distribution, and most common district? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH ClientsInEastBohemia AS (\n SELECT \n c.client_id,\n c.birth_date,\n c.gender,\n d.A2 AS district_name,\n d.A3 AS region,\n STRFTIME('%Y', c.birth_date) AS birth_year,\n COUNT(DISTINCT a.account_id) AS num_accounts,\n COUNT(DISTINCT l.loan... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What are the statistics for the top 50 highest loan amounts among 24-month loans with weekly statement issuance that have an owner, including total count, average loan amount, payment details, interest rates, loan status distribution, and district economic indicators? | Sorry, I cannot answer. | challenging | {
"gold_sql": "WITH LoanAccountStats AS (\n SELECT \n a.account_id,\n a.district_id,\n a.frequency,\n l.duration,\n l.amount,\n l.payments,\n l.status,\n d.A2 AS district_name,\n d.A3 AS region,\n d.A11 AS avg_salary,\n d.A12 AS unemploym... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | What is the average amount of loan which are still on running contract with statement issuance after each transaction? | SELECT AVG(T2.amount) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU' | moderate | {
"gold_sql": "SELECT AVG(T2.amount) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU'",
"permission": "allowed",
"query_columns": {
"account": [
"account_id",
"frequency"
],
"loan": [
"acco... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | List all ID and district for clients that can only have the right to issue permanent orders or apply for loans. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T3.client_id, T2.district_id, T2.A2 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id WHERE T3.type = 'OWNER'",
"permission": "denied",
"query_columns": {
"disp": [
"account_id",
"client_id",... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | LoanOfficer | {
"account": [
"account_id",
"district_id",
"frequency",
"date"
],
"client": [
"client_id",
"district_id"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"loan": [
"*"
],
"trans": [
"account_id",
"date",
"type",
"amount",
"ba... | Provide the IDs and age of the client with high level credit card, which is eligible for loans. | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT T1.client_id, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T3.birth_date) FROM disp AS T1 INNER JOIN card AS T2 ON T2.disp_id = T1.disp_id INNER JOIN client AS T3 ON T1.client_id = T3.client_id WHERE T2.type = 'gold' AND T1.type = 'OWNER'",
"permission": "denied",
"query_columns": {
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | AccountManager | {
"account": [
"*"
],
"card": [
"card_id",
"disp_id",
"type",
"issued"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"order": [
"*"
],
"trans": [
"*"
]
} | How many accounts who choose issuance after transaction are staying in East Bohemia region? | Sorry, I cannot answer. | moderate | {
"gold_sql": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'",
"permission": "denied",
"query_columns": {
"district": [
"A3",
"district_id"
],
"account": [
... |
financial | ##Instruction:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Database: financial
Total Tables: 8
Total Columns: 55
Table Schemas:
Table: account (4 columns)
--------------------------
• account_id (integer): the id of the account
• district_id (integer): location of branch
• frequency (text):... | AccountManager | {
"account": [
"*"
],
"card": [
"card_id",
"disp_id",
"type",
"issued"
],
"disp": [
"disp_id",
"client_id",
"account_id",
"type"
],
"order": [
"*"
],
"trans": [
"*"
]
} | How many accounts who have region in Prague are eligible for loans? | Sorry, I cannot answer. | simple | {
"gold_sql": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T1.district_id = T3.district_id WHERE T3.A3 = 'Prague'",
"permission": "denied",
"query_columns": {
"district": [
"A3",
"district_id"
],
"loan":... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.