question
stringlengths
13
765
query
stringlengths
20
406
db_id
stringclasses
2 values
What city has a last name like "Morris"?
SELECT city FROM Clients WHERE last_name LIKE "Morris"
loan_db
What is the transaction_id of the transaction that has a not(product_family_code in (62348, 90523))?
SELECT transaction_id FROM Transactions WHERE NOT(product_family_code IN (62348, 90523))
transactions_db
What is the counterparty_bank branch ID of the source?
SELECT counterparty_bank_branch_id, client_id FROM Source
transactions_db
How many deposits have a sum between 779505 and 801367 by amount?
SELECT COUNT(source) FROM Deposits WHERE amount BETWEEN 779505 AND 801367 GROUP BY amount
loan_db
What is the bank_branch_id, country name of the beneficiary with a beneficiary_id of 69012 and a bank_branch_id different than 14458?
SELECT bank_branch_id, country_name FROM Beneficiary WHERE beneficiary_id = 69012 AND bank_branch_id <> 14458
transactions_db
What is the branch_counterfeit bank - id of the bank with a client - id of 38197?
SELECT counterparty_bank_branch_id FROM Source WHERE client_id = 38197
transactions_db
What is the branch identification of the beneficiary?
SELECT bank_branch_id FROM Beneficiary
transactions_db
What is the budget for loans?
SELECT budget FROM Loans
loan_db
What is the counterparty bank branch id, primary contract id of the bank with a primary contract id of 9433?
SELECT counterparty_bank_branch_id, primary_contract_id FROM Source WHERE primary_contract_id = 9433
transactions_db
What is the total number of loan_ids for a loan with a loan_id of 43469 and a client ID different than 76210?
SELECT COUNT(loan_id) FROM Loans WHERE loan_id = 43469 AND client_id <> 76210
loan_db
How many loans have a duration larger than 18?
SELECT COUNT(status), client_id FROM Loans WHERE duration > 18
loan_db
What is the product_family_code, client_id for transactions with a transaction_amount different than 76836 and not(beneficiary-id in (40881, 55233))?
SELECT product_family_code, client_id FROM Transactions WHERE transaction_amount <> 76836 AND NOT(beneficiary_id IN (40881, 55233))
transactions_db
What is the Account_ID of accounts?
SELECT account_id FROM Accounts
loan_db
How many transactions have an is_fraudulent of the group "yes" by transaction_amount?
SELECT COUNT(is_fraudulent), product_family_code FROM Transactions WHERE is_fraudulent = "Yes" GROUP BY transaction_amount
transactions_db
What is the gender of the client?
SELECT gender FROM Clients
loan_db
What is the name of the account?
SELECT * FROM Accounts
loan_db
What is the type, first_name, total balance, account_id of the account with a balance less than 992467 and a type different than the group of "saving account" by account_id?
SELECT Accounts.type, Clients.first_name, COUNT(Accounts.balance), Accounts.account_id FROM Accounts JOIN Clients ON Accounts.client_id = Clients.client_id WHERE Accounts.balance <= 992467 AND Accounts.type <> "Saving account" GROUP BY Accounts.account_id
loan_db
What is the timer_ID of the time?
SELECT timestamp_id FROM Time
transactions_db
What is the client_id of the loans?
SELECT client_id FROM Loans
loan_db
What is the name of the country and beneficiary id of the beneficiary?
SELECT country_name, beneficiary_id FROM Beneficiary
transactions_db
What is the transaction_id and amount currency for beneficiary id (31360, 36246)?
SELECT transaction_id, amount_currency FROM Transactions WHERE beneficiary_id IN (31360, 36246)
transactions_db
What is the primary contract id, quantity currency for transactions with "no"?
SELECT primary_contract_id, amount_currency FROM Transactions WHERE is_fraudulent = "No"
transactions_db
What is the transaction amount of the transaction?
SELECT transaction_amount FROM Transactions
transactions_db
What is the status, budget of the loan with an interest between 10 and 14 and a duration between 18 and 27?
SELECT status, budget FROM Loans WHERE interest BETWEEN 10 AND 14 AND duration BETWEEN 18 AND 27
loan_db
What is the primary contract id for the transactions?
SELECT primary_contract_id FROM Transactions
transactions_db
What is the primary contract id?
SELECT primary_contract_id FROM Source
transactions_db
What is the name of the beneficiary country?
SELECT country_name FROM Beneficiary
transactions_db
How many primary contract ids have a counterparty bank branch ID of 72741?
SELECT COUNT(primary_contract_id) FROM Source WHERE counterparty_bank_branch_id = 72741
transactions_db
What is the counterparty bank branch id of the bank with a counterparty_donor_id of 78801 or a primary contract id different than 73252?
SELECT counterparty_bank_branch_id FROM Source WHERE counterparty_donor_id = 78801 OR primary_contract_id <> 73252
transactions_db
What is the Account_ID of accounts?
SELECT account_id FROM Accounts
loan_db
What is the unique client-ID for loans with a status different from "Overdue"?
SELECT DISTINCT client_id FROM Loans WHERE status <> "overdue"
loan_db
What is the country code, bank branch ID of the beneficiary?
SELECT country_code, bank_branch_id FROM Beneficiary
transactions_db
What is the client_id and account_id of accounts?
SELECT client_id, account_id FROM Accounts
loan_db
What is the smallest day number for the week number for the "Tuesday" group?
SELECT MIN(day_number) FROM Time WHERE day_name LIKE "Tuesday" GROUP BY week_number
transactions_db
What is the timestamp_id of the day name in ('tuesday', 'thursday') or the month number between 9 and 11?
SELECT timestamp_id FROM Time WHERE day_name IN ('Tuesday', 'Thursday') OR month_number BETWEEN 9 AND 11
transactions_db
What is the name of the country and bank branch id of the beneficiary with bank branch id 66002?
SELECT country_name, bank_branch_id FROM Beneficiary WHERE NOT bank_branch_id = 66002
transactions_db
What is the client_id, counterparty bank branch id of the bank with a counterparty bank branch ID of 99948 or counterparty bank branch id in (92862, 82840)?
SELECT client_id, counterparty_bank_branch_id FROM Source WHERE counterparty_donor_id = 99948 OR counterparty_bank_branch_id IN (92862, 82840)
transactions_db
What is the month number, week number of the episode?
SELECT month_number, week_number FROM Time
transactions_db
What is the Account_ID of accounts?
SELECT account_id FROM Accounts
loan_db
What is the counterparty_donor_id of the contract with primary contract id from 98966?
SELECT counterparty_donor_id FROM Source WHERE primary_contract_id <> 98966
transactions_db
What is the counterparty bank branch id of the bank with a client_id different than 57271?
SELECT counterparty_bank_branch_id FROM Source WHERE client_id <> 57271
transactions_db
How many transactions have an is Fraudulent of Yes?
SELECT COUNT(client_id) FROM Transactions WHERE is_fraudulent = "Yes"
transactions_db
What is the interest, budget of the loan?
SELECT interest, budget FROM Loans
loan_db
What city, last name is the client?
SELECT city, last_name FROM Clients
loan_db
What is the counterparty_donor_id, primary contract_id of the source?
SELECT counterparty_donor_id, primary_contract_id FROM Source
transactions_db
What is the client_id of the client?
SELECT client_id FROM Clients
loan_db
What is the timestamp_id for transactions?
SELECT timestamp_id FROM Transactions
transactions_db
What is the name of the client with a gender of "Mulan"?
SELECT first_name, city FROM Clients WHERE gender = "Male"
loan_db
What is the Account_ID, amount of the deposits?
SELECT account_id, amount FROM Deposits
loan_db
What is the source, client_id, total number of deposits in the account_id for the source "transaction" or the amount 141255 group by source?
SELECT Deposits.source, Accounts.client_id, COUNT(Deposits.amount), Deposits.deposit_id FROM Deposits INNER JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE Deposits.source LIKE "Transaction" OR Deposits.amount = 141255 GROUP BY Deposits.source
loan_db
What week number, year has a day number of 16, and a month number smaller than 11?
SELECT week_number, year FROM Time WHERE day_number = 16 AND NOT month_number < 11
transactions_db
What is the product_family_code, the client_id for transactions?
SELECT product_family_code, client_id FROM Transactions
transactions_db
What is the name of the person with the last name of "Coleman" and an email that is different from "Ma"?
SELECT * FROM Clients WHERE last_name = "Coleman" AND email <> "lopez.williams@cs.ma"
loan_db
What is the name, first name and last name of the client with a birth year less than 1993?
SELECT last_name, first_name FROM Clients WHERE year_of_birth < 1993
loan_db
What is the day number of the game?
SELECT day_number FROM Time
transactions_db
What is the transaction_id of transactions?
SELECT transaction_id FROM Transactions
transactions_db
What is the client_id and counterparty bank branch id of the bank with a counterparty bank branch ID different from 68317?
SELECT client_id, counterparty_bank_branch_id FROM Source WHERE counterparty_donor_id <> 68317
transactions_db
What is the amount of deposits?
SELECT amount, account_id FROM Deposits
loan_db
What is the amount of the currency of transactions?
SELECT amount_currency FROM Transactions
transactions_db
What is the name of the email and the first name of the client?
SELECT email, first_name FROM Clients
loan_db
What is the interest, status of loan on a client id (97380, 96522) or a duration larger than 23?
SELECT interest, status FROM Loans WHERE client_id IN (97380, 96522) OR duration > 23
loan_db
What is the name, year of birth and the total number of cities for the client in the group 'Evans', 'Jenkins', 'Ross' and gender in the group by last name?
SELECT Clients.year_of_birth, Accounts.type, COUNT(Clients.city) FROM Clients LEFT JOIN Accounts ON Clients.client_id = Accounts.client_id WHERE Clients.first_name IN ('Evans', 'Jenkins', 'Ross') AND Clients.gender IN ('Female', 'Male') GROUP BY Clients.last_name
loan_db
What is the client_id of the source?
SELECT client_id FROM Source
transactions_db
How many beneficiaries have a bank branch ID of (7115, 75797) and a country name like "Canada"?
SELECT COUNT(beneficiary_id) FROM Beneficiary WHERE NOT(bank_branch_id IN (7115, 75797)) AND country_name LIKE "Canada"
transactions_db
What is the counterparty_bank branch_id, client_id of the bank with a counterparty bank branch_id of 17813?
SELECT counterparty_bank_branch_id, client_id FROM Source WHERE counterparty_bank_branch_id = 17813
transactions_db
What is the total number of client_id, counterparty_bank_branch_id when client_id is 94692 or primary contract-id is different than 88204?
SELECT COUNT(client_id), counterparty_bank_branch_id FROM Source WHERE client_id = 94692 OR primary_contract_id <> 88204
transactions_db
What is the transaction_amount, primary contract_id and total transaction value of the transaction left-clicking source on client_id of client_id when timestamp_id is 56341 and when primary contract_id is 24274 GROUP by transaction_id?
SELECT Transactions.transaction_amount, Source.primary_contract_id, COUNT(Transactions.transaction_id) FROM Transactions LEFT JOIN Source ON Transactions.client_id = Source.client_id WHERE timestamp_id = 56341 AND primary_contract_id = 24274 GROUP BY transaction_id
transactions_db
What is the amount of the loan?
SELECT * FROM Loans
loan_db
What is the total number of accounts with an account ID different than 31864 and a balance smaller than 759607?
SELECT COUNT(client_id) FROM Accounts WHERE account_id <> 31864 AND balance <= 759607
loan_db
What is the loan_id of 85950?
SELECT * FROM Loans WHERE loan_id = 85950
loan_db
What is the beneficiary_id and is the transactions fraudulent?
SELECT beneficiary_id, is_fraudulent FROM Transactions
transactions_db
What city, gender is the client?
SELECT city, gender FROM Clients
loan_db
How many different numbers are there for the counterparty bank branch id and the primary contract id when the counterparty bank branch id is different than 59928?
SELECT COUNT(counterparty_bank_branch_id), primary_contract_id FROM Source WHERE counterparty_bank_branch_id <> 59928
transactions_db
What is the country code of the beneficiary with a bank branch number of 91053 or a country name like "England"?
SELECT country_code FROM Beneficiary WHERE bank_branch_id = 91053 OR country_name LIKE "England"
transactions_db
What is the status, balance and total budget of the loan left with accounts on client_id of client_id when interest is less than 9 or when status is not paid off by the group by duration?
SELECT Loans.status, Accounts.balance, COUNT(Loans.budget) FROM Loans LEFT JOIN Accounts ON Loans.client_id = Accounts.client_id WHERE Loans.interest < 9 OR NOT Loans.status LIKE paid off GROUP BY Loans.duration
loan_db
What city was the client born in?
SELECT city, year_of_birth FROM Clients
loan_db
What is the year of birth, duration, total number of first name, last name of client with an email like ma" group by birth year?
SELECT Clients.year_of_birth, Loans.duration, COUNT(Clients.first_name), Clients.last_name FROM Clients INNER JOIN Loans ON Clients.client_id = Loans.client_id WHERE Clients.email LIKE "harris.smith@cs.ma" GROUP BY Clients.year_of_birth
loan_db
What is the beneficiary_id of the transaction with a transaction_id of (46360, 15172) or a client_id of 38547?
SELECT beneficiary_id FROM Transactions WHERE transaction_id IN (46360, 15172) OR client_id = 38547
transactions_db
What is the source of deposits?
SELECT source FROM Deposits
loan_db
What is the name of the day of the game?
SELECT day_name FROM Time
transactions_db
What is the account_id and deposit_id of deposit with an account_id of 41063?
SELECT account_id, deposit_id FROM Deposits WHERE account_id = 41063
loan_db
What is the Account_ID, amount of the deposits?
SELECT account_id, amount FROM Deposits
loan_db
What is the timestamp_id, hour_number of the time when the hour_number is different than 24?
SELECT timestamp_id, hour_number FROM Time WHERE hour_number <> 24
transactions_db
What is the timestamp_id, client_id and the total number of is_fraudulent transactions that join the source on primary_contract_id of primary_contract_id when the product_family_code is 66952 by is_fraudulent?
SELECT Transactions.timestamp_id, Source.client_id, COUNT(Transactions.client_id), Transactions.is_fraudulent FROM Transactions JOIN Source ON Transactions.primary_contract_id = Source.primary_contract_id WHERE product_family_code = 66952 GROUP BY is_fraudulent
transactions_db
What day was the game played in the year?
SELECT day_name, year FROM Time
transactions_db
What is the country code, beneficiary_id of beneficiary?
SELECT country_code, beneficiary_id FROM Beneficiary
transactions_db
What is the status, gender, total interest rate, duration of the loan with a status in ('paid', 'current') and interest different from the 22 group by budget?
SELECT Loans.status, Clients.gender, COUNT(Loans.interest), Loans.duration FROM Loans INNER JOIN Clients ON Loans.client_id = Clients.client_id WHERE Loans.status IN ('paid off', 'current') AND Loans.interest <> 22 GROUP BY Loans.budget
loan_db
What is the deposit_id of deposits?
SELECT deposit_id FROM Deposits
loan_db
How many bank branch ids, country codes for the beneficiary with a bank branch id (48021, 37231) or beneficiary-id 33715 are there?
SELECT COUNT(bank_branch_id), country_code FROM Beneficiary WHERE bank_branch_id IN (48021, 37231) OR beneficiary_id = 33715
transactions_db
How many transactions have a primary contract ID of "yes"?
SELECT COUNT(client_id) FROM Transactions WHERE primary_contract_id IN (67817, 28778) OR is_fraudulent = "Yes"
transactions_db
What is the amount, client_id, total number of deposit_ids for the account_id not exceeding 215846 Group by deposit_id?
SELECT Deposits.amount, Accounts.client_id, COUNT(Deposits.source), Deposits.deposit_id FROM Deposits JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE NOT Deposits.amount <= 215846 GROUP BY Deposits.deposit_id
loan_db
What is the balance of accounts?
SELECT balance FROM Accounts
loan_db
What is the client_id and primary contract_id of transactions?
SELECT client_id, primary_contract_id FROM Transactions
transactions_db
What is the hour number of the game?
SELECT hour_number FROM Time
transactions_db
What is the timestamp_id, day_number of the time?
SELECT timestamp_id, day_number FROM Time
transactions_db
What is the balance of accounts?
SELECT balance FROM Accounts
loan_db
What is the name of the account?
SELECT * FROM Accounts
loan_db
What week number has a day number smaller than 25?
SELECT week_number FROM Time WHERE day_number <= 25
transactions_db
What is the beneficiary_id and country name of the beneficiary whose country name is different from "France"?
SELECT beneficiary_id, country_name FROM Beneficiary WHERE country_name <> "France"
transactions_db
What is the unique number of accounts with a client_id different from 31336 or an account_id in (10138, 67568)?
SELECT DISTINCT COUNT(*) FROM Accounts WHERE client_id <> 31336 OR account_id IN (10138, 67568)
loan_db