question
stringlengths
13
765
query
stringlengths
20
406
db_id
stringclasses
2 values
How many loans have a duration smaller than 6 and have a client_id different than 51136?
SELECT COUNT(*) FROM Loans WHERE duration < 6 AND client_id <> 51136
loan_db
How many transactions have a client_id of 47481 group by client_id?
SELECT COUNT(amount_currency) FROM Transactions WHERE client_id = 47481 GROUP BY client_id
transactions_db
What is the branch identification of the beneficiary?
SELECT bank_branch_id FROM Beneficiary
transactions_db
What is the total number of accounts with a "deposit account" or a balance greater than 767935 group by account_id?
SELECT COUNT(account_id), balance FROM Accounts WHERE type = "Deposit account" OR balance > 767935 GROUP BY account_id
loan_db
What is the client_id and transaction_id of transactions?
SELECT client_id, transaction_id FROM Transactions
transactions_db
What is the highest balance type for accounts with a client id (88526, 84907)?
SELECT MAX(balance), type FROM Accounts WHERE client_id IN (88526, 84907)
loan_db
What is the lowest budget, client_id for loans with a client_id different from 15623?
SELECT MIN(budget), client_id FROM Loans WHERE client_id <> 15623
loan_db
What is the primary contract id, is_fraudulent for transactions?
SELECT primary_contract_id, is_fraudulent FROM Transactions
transactions_db
What is the amount, balance, total number of deposit_ids, source for account_id with a source like "Cash", and a deposit_id different from 50344 group by deposit_id?
SELECT Deposits.amount, Accounts.balance, COUNT(Deposits.deposit_id), Deposits.source FROM Deposits JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE Deposits.source LIKE "Cash" AND Deposits.deposit_id <> 50344 GROUP BY Deposits.deposit_id
loan_db
What is the total number of transactions with a transaction amount smaller than 82558 or is_fraudulent is different than the "Yes" Group by amount_currency?
SELECT COUNT(timestamp_id), primary_contract_id FROM Transactions WHERE transaction_amount < 82558 OR is_fraudulent <> "Yes" GROUP BY amount_currency
transactions_db
What is the hour number, day number of the year before 2016 and a day number different from 19?
SELECT hour_number, day_name FROM Time WHERE year <= 2016 AND day_number <> 19
transactions_db
What is the primary contract id, the year, the number of is_fraudulent transactions with a time interval on timestamp_id of timestamp_id when the primary contract id is (28391, 27398) and the product family code is 42904 by is_fraudulent group?
SELECT Transactions.primary_contract_id, Time.year, COUNT(Transactions.is_fraudulent), Transactions.transaction_amount FROM Transactions INNER JOIN Time ON Transactions.timestamp_id = Time.timestamp_id WHERE primary_contract_id IN (28391, 27398) AND product_family_code = 42904 GROUP BY is_fraudulent
transactions_db
What is the unique number of the counterparty_donor_id when the counterparty_donor_id is different than 30260 or the client-id is 93406?
SELECT DISTINCT COUNT(counterparty_donor_id) FROM Source WHERE counterparty_donor_id <> 30260 OR NOT client_id = 93406
transactions_db
What is the beneficiary_id of transactions?
SELECT beneficiary_id FROM Transactions
transactions_db
What is the total number of client_id, counterparty_donor_id when counterparty_donor_id is different than 68971 and not counterparty bank branch-id is 59955?
SELECT COUNT(client_id), counterparty_donor_id FROM Source WHERE counterparty_donor_id <> 68971 AND NOT counterparty_bank_branch_id = 59955
transactions_db
What month was the game played?
SELECT month_number FROM Time
transactions_db
What is the counterparty bank branch id, primary contract id of the source?
SELECT counterparty_bank_branch_id, primary_contract_id FROM Source
transactions_db
What is beneficiary name, country_name?
SELECT beneficiary_id, country_name FROM Beneficiary
transactions_db
What is the source of the deposit amount that is different from "Cash" or Account_id is less than 61285?
SELECT source, amount FROM Deposits WHERE source <> "Cash" OR account_id <> 61285
loan_db
What is the client_id and the status of the loan?
SELECT client_id, status FROM Loans
loan_db
What is the day_name of the time with a timestamp_id (91252, 37147) and a month_number of 5?
SELECT day_name FROM Time WHERE timestamp_id IN (91252, 37147) AND month_number = 5
transactions_db
What is the source of deposits?
SELECT source FROM Deposits
loan_db
What are the clients?
SELECT * FROM Clients
loan_db
What is the source, client_id, total amount of deposits joining accounts with account_id of account_id when source or deposit_id in the group (3811, 43072) is by deposit_id?
SELECT Deposits.source, Accounts.client_id, COUNT(Deposits.amount) FROM Deposits JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE Deposits.source LIKE "Transaction" OR Deposits.deposit_id IN (3811, 43072) GROUP BY Deposits.deposit_id
loan_db
What type of accounts has a type of loan account or a client_id of 99566?
SELECT type FROM Accounts WHERE type = "Loan account" OR client_id = 99566
loan_db
What is the primary contract id, transaction id of transactions?
SELECT primary_contract_id, transaction_id FROM Transactions
transactions_db
What is the is_fraudulent, year, total number of transactions left with a time on the timestamp ID of timestamp ID when beneficiary is (77038, 3428) and when transaction amount is 29000 by the group_id?
SELECT Transactions.is_fraudulent, Time.year, COUNT(Transactions.amount_currency), Transactions.transaction_id FROM Transactions LEFT JOIN Time ON Transactions.timestamp_id = Time.timestamp_id WHERE beneficiary_id IN (77038, 3428) AND transaction_amount = 29000 GROUP BY client_id
transactions_db
What is the counterparty_donor_id, primary contract_id of counterparty bank branch id (76214, 93989)?
SELECT counterparty_donor_id, primary_contract_id FROM Source WHERE counterparty_bank_branch_id IN (76214, 93989)
transactions_db
What is the counterparty_donor_id of the primary contract_id in (28530, 87802) or the client_id in 68630?
SELECT counterparty_donor_id FROM Source WHERE primary_contract_id IN (28530, 87802) OR client_id = 68630
transactions_db
What is the client_id and account_id of the account with a client_id different from 10431?
SELECT client_id, account_id FROM Accounts WHERE client_id <> 10431
loan_db
How many left off loans join accounts with a status like "paid off" or interest greater than 12 group interest?
SELECT COUNT(*) FROM Loans LEFT JOIN Accounts ON Loans.client_id = Accounts.client_id WHERE Loans.status LIKE "paid off" OR Loans.interest >= 12 GROUP BY Loans.interest
loan_db
What is the amount of the loan?
SELECT * FROM Loans
loan_db
What is the client_id of the bank with a counterparty bank branch ID of 87946 or a client_id that is different than 98664?
SELECT client_id FROM Source WHERE counterparty_bank_branch_id = 87946 OR client_id <> 98664
transactions_db
What is the name of the email and gender of the client?
SELECT email, gender FROM Clients
loan_db
What is the counterparty_bank branch ID?
SELECT counterparty_bank_branch_id FROM Source
transactions_db
How many days, hours and days have a month number different than 6?
SELECT COUNT(day_name), hour_number FROM Time WHERE month_number <> 6
transactions_db
What is the client_id and account_id of accounts?
SELECT client_id, account_id FROM Accounts
loan_db
How many loans have a budget larger than 994916?
SELECT COUNT(client_id) FROM Loans WHERE budget >= 994916
loan_db
What is the unique year, day and country of the event?
SELECT DISTINCT year, day_name FROM Time
transactions_db
What is the day number, month number of the game?
SELECT day_number, month_number FROM Time
transactions_db
What is balance, deposit_ID, total number of client_id, type of account with deposit account id of account_id and a balance greater than 772118 Group by client_id?
SELECT Accounts.balance, Deposits.deposit_id, COUNT(Accounts.client_id), Accounts.type FROM Accounts RIGHT JOIN Deposits ON Accounts.account_id = Deposits.account_id WHERE Accounts.type = "Saving account" AND Accounts.balance >= 772118 GROUP BY Accounts.client_id
loan_db
What is the unique hour-number, year?
SELECT DISTINCT hour_number, year FROM Time
transactions_db
What is the deposit_id, amount of the deposit with deposit_id in (87370, 55727) or a source like "check"?
SELECT deposit_id, amount FROM Deposits WHERE deposit_id IN (87370, 55727) OR source LIKE "Check"
loan_db
What is the budget, loan_id of the loan?
SELECT budget, loan_id FROM Loans
loan_db
What is the primary contract ID for the customer ID 13009 and the counterparty donor ID in (68302, 57167)?
SELECT primary_contract_id FROM Source WHERE client_id = 13009 AND counterparty_donor_id IN (68302, 57167)
transactions_db
What is the unique timestamp_id, country name, number(is_fraudulent), client_id of the transaction if the beneficiary is fraudulent with "no" and a transaction id different by timestamp_id than 26966 group?
SELECT DISTINCT Transactions.timestamp_id, Beneficiary.country_name, COUNT(Transactions.is_fraudulent), Transactions.client_id FROM Transactions JOIN Beneficiary ON Transactions.beneficiary_id = Beneficiary.beneficiary_id WHERE is_fraudulent = "No" AND transaction_id <> 26966 GROUP BY timestamp_id
transactions_db
What is the client_id of the bank with a counterparty bank branch ID of 75084 and not(client_id in (77588, 83372))
SELECT client_id FROM Source WHERE counterparty_bank_branch_id = 75084 AND NOT(client_id IN (77588, 83372))
transactions_db
How many loans have a loan_id of 69896, 60297) or a status like "overdue"?
SELECT COUNT(client_id) FROM Loans WHERE loan_id IN (69896, 60297) OR status LIKE "overdue"
loan_db
How many deposits have an account_id of 80121?
SELECT COUNT(deposit_id) FROM Deposits WHERE account_id = 80121
loan_db
What is the deposit_id of deposits?
SELECT deposit_id FROM Deposits
loan_db
What is the name of the country and bank branch ID of the beneficiary?
SELECT country_name, bank_branch_id FROM Beneficiary
transactions_db
What is the client_id of the client?
SELECT client_id FROM Clients
loan_db
What is the name of the beneficiary country?
SELECT country_name FROM Beneficiary
transactions_db
What is the client_id of the client with an email like "ma" in a city different from "salt lake city"?
SELECT client_id FROM Clients WHERE email LIKE "[email protected]" AND city <> "Salt Lake City"
loan_db
What is the average day number for the year after 2016 and a day number less than 10?
SELECT AVG(day_number) FROM Time WHERE year >= 2016 AND day_number < 10
transactions_db
What is beneficiary_id?
SELECT beneficiary_id FROM Beneficiary
transactions_db
What is the counterparty_bank branch ID?
SELECT counterparty_bank_branch_id FROM Source
transactions_db
What is the unique counterparty_bank_branch_id, primary contract_id of the bank with a not counterparty_donor-id of 80032 or counterparty_bank_branch_id in (68386, 80124)?
SELECT DISTINCT counterparty_bank_branch_id, primary_contract_id FROM Source WHERE NOT counterparty_donor_id = 80032 OR counterparty_bank_branch_id IN (68386, 80124)
transactions_db
What is the amount of the transaction?
SELECT amount_currency, beneficiary_id FROM Transactions
transactions_db
What is the amount, type, and total number of deposit ids for the deposit id of the account ID for the "Cash" source or deposit id of the 62036 group?
SELECT Deposits.amount, Accounts.type, COUNT(Deposits.source), Deposits.deposit_id FROM Deposits JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE Deposits.source = "Cash" OR Deposits.deposit_id = 62036 GROUP BY Deposits.deposit_id
loan_db
What is the branch identification of the bank, the country code of the beneficiary?
SELECT bank_branch_id, country_code FROM Beneficiary
transactions_db
How many beneficiaries have a beneficiary_id (93623, 69523)?
SELECT COUNT(beneficiary_id) FROM Beneficiary WHERE beneficiary_id IN (93623, 69523)
transactions_db
What is the country code of the beneficiary with a bank branch id of 49935?
SELECT country_code FROM Beneficiary WHERE bank_branch_id = 49935
transactions_db
What type of account has an account_id of 76107 or a loan account that is not typed?
SELECT type FROM Accounts WHERE account_id = 76107 OR NOT type LIKE Loan account
loan_db
What is what is clients when the year of birth is 2007?
SELECT * FROM Clients WHERE year_of_birth = 2007
loan_db
What is the client_id of the transaction with transaction_id 33705?
SELECT client_id FROM Transactions WHERE transaction_id = 33705
transactions_db
What is the account_id of the deposit with an amount smaller than 785271?
SELECT account_id FROM Deposits WHERE amount <= 785271
loan_db
What is the client_id and product_family_code for transactions?
SELECT client_id, product_family_code FROM Transactions
transactions_db
What is the period of the loan?
SELECT duration, client_id FROM Loans
loan_db
What is the budget, status of loan on a client id of 17532 or a budget between 787212 and 985116?
SELECT budget, status FROM Loans WHERE client_id = 17532 OR budget BETWEEN 787212 AND 985116
loan_db
What is the name of the beneficiary with country name of Canada?
SELECT country_name FROM Beneficiary WHERE country_name = "Canada"
transactions_db
What is the loan_id for loans?
SELECT loan_id FROM Loans
loan_db
What is the transaction amount of the transaction?
SELECT transaction_amount FROM Transactions
transactions_db
What is is_fraudulent, client_id, number of total client_ids for the transaction in source with a timestamp_id of 81835 and a client_id of 94270 by the transaction amount?
SELECT Transactions.is_fraudulent, Source.client_id, COUNT(Transactions.client_id) FROM Transactions INNER JOIN Source ON Transactions.primary_contract_id = Source.primary_contract_id WHERE timestamp_id = 81835 AND client_id = 94270 GROUP BY transaction_amount
transactions_db
What city has an email that is different than "Ma"?
SELECT city FROM Clients WHERE email <> "[email protected]"
loan_db
What is the account_id of deposits?
SELECT account_id FROM Deposits
loan_db
What is the day number of the game?
SELECT day_number FROM Time
transactions_db
How many times is the status in the ('paid off', 'current', 'overdue') group by interest?
SELECT COUNT(*) FROM Loans JOIN Clients ON Loans.client_id = Clients.client_id WHERE Loans.status IN ('paid off', 'current', 'overdue') GROUP BY Loans.interest
loan_db
How many deposits have an amount different than 700682 and a deposit_id less than 88777?
SELECT COUNT(source), amount FROM Deposits WHERE amount <> 700682 AND deposit_id <> 88777
loan_db
What is beneficiary name, country_name?
SELECT beneficiary_id, country_name FROM Beneficiary
transactions_db
What is product_family_code, country_code, total number of primary contract_id, timestamp_id for the transaction with beneficiary_id of beneficiary_id, when NOT is_fraudulent is yes or when timestamp_id is different by product_family_code than 6480 group
SELECT Transactions.product_family_code, Beneficiary.country_code, COUNT(Transactions.primary_contract_id), Transactions.timestamp_id FROM Transactions JOIN Beneficiary ON Transactions.beneficiary_id = Beneficiary.beneficiary_id WHERE NOT is_fraudulent = Yes OR timestamp_id <> 6480 GROUP BY product_family_code
transactions_db
What is the unique number of bank branch ID, beneficiary id for the beneficiary whose country name is different from "Germany"?
SELECT DISTINCT COUNT(bank_branch_id), beneficiary_id FROM Beneficiary WHERE country_name <> "Germany"
transactions_db
What is the name of the account?
SELECT * FROM Accounts
loan_db
What is beneficiary_id?
SELECT beneficiary_id FROM Beneficiary
transactions_db
What is the timer_ID of the time?
SELECT timestamp_id FROM Time
transactions_db
How many primary contract ids have a counterparty bank branch id different from 71335 or primary contract id in (11574, 6998)?
SELECT COUNT(primary_contract_id) FROM Source WHERE counterparty_bank_branch_id <> 71335 OR primary_contract_id IN (11574, 6998)
transactions_db
What is the type, client_id of account?
SELECT type, client_id FROM Accounts
loan_db
How many countries have a bank branch ID different than 7189 or a country code ( us , UK ', LU ', 'de ', be ')?
SELECT COUNT(country_name), country_code FROM Beneficiary WHERE bank_branch_id <> 7189 OR country_code IN ('US', 'UK', 'LU', 'DE', 'BE')
transactions_db
What is the country code and the country name of the beneficiary with a beneficiary - ID (56839, 57898)?
SELECT country_code, country_name FROM Beneficiary WHERE beneficiary_id IN (56839, 57898)
transactions_db
What is the hour number of the game?
SELECT hour_number FROM Time
transactions_db
What is the budget for loans with a duration different than 17?
SELECT budget FROM Loans WHERE duration <> 17
loan_db
How many countries code "de "?
SELECT COUNT(country_code) FROM Beneficiary WHERE country_code = "DE"
transactions_db
What is the duration of the loan with a client-id of 77549?
SELECT duration FROM Loans WHERE client_id = 77549
loan_db
How many years did the day number exceed 30 or had a week number 7?
SELECT COUNT(year), day_name FROM Time WHERE day_number > 30 OR week_number = 7
transactions_db
What is the period of the loan?
SELECT duration, client_id FROM Loans
loan_db
What is the budget for loans which are not paid off or have a duration between 23 and 26?
SELECT budget FROM Loans WHERE NOT status = paid off OR duration BETWEEN 23 AND 26
loan_db
What is the amount, type and total deposit_id of deposit_id of account_id when the source is different than "check" and deposit_id is less than 60072 group by amount?
SELECT Deposits.amount, Accounts.type, COUNT(Deposits.deposit_id) FROM Deposits JOIN Accounts ON Deposits.account_id = Accounts.account_id WHERE Deposits.source <> "Check" AND Deposits.deposit_id <> 60072 GROUP BY Deposits.amount
loan_db
What is the transaction amount of the beneficiary on a product_family_code in (24272, 59976)?
SELECT COUNT(transaction_amount) FROM Transactions WHERE product_family_code IN (24272, 59976) AND beneficiary_id <> 61580
transactions_db
How many deposits have an amount smaller than 807920 or an account_id different than 88555?
SELECT COUNT(*) FROM Deposits WHERE amount <= 807920 OR account_id <> 88555
loan_db
What is the loan_id for loans?
SELECT loan_id FROM Loans
loan_db