question_id int64 1 75.7k | db_id stringclasses 33
values | db_name stringclasses 4
values | question stringlengths 19 259 | partition stringclasses 4
values | difficulty stringclasses 3
values | SQL stringlengths 25 862 |
|---|---|---|---|---|---|---|
1,401 | customers_and_invoices | spider | What is the customer last name, id and phone number with most number of orders? | train | hard | SELECT t2.customer_last_name, t1.customer_id, t2.phone_number FROM orders AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 |
1,402 | customers_and_invoices | spider | Return the last name, id and phone number of the customer who has made the greatest number of orders. | train | hard | SELECT t2.customer_last_name, t1.customer_id, t2.phone_number FROM orders AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 |
1,403 | customers_and_invoices | spider | Show all product names without an order. | train | hard | SELECT product_name FROM products EXCEPT SELECT t1.product_name FROM products AS t1 JOIN order_items AS t2 ON t1.product_id = t2.product_id |
1,404 | customers_and_invoices | spider | What are the names of products that have never been ordered? | train | hard | SELECT product_name FROM products EXCEPT SELECT t1.product_name FROM products AS t1 JOIN order_items AS t2 ON t1.product_id = t2.product_id |
1,405 | customers_and_invoices | spider | Show all product names and the total quantity ordered for each product name. | train | hard | SELECT t2.product_name, SUM(t1.product_quantity) FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_name |
1,406 | customers_and_invoices | spider | What are the different product names, and what is the sum of quantity ordered for each product? | train | hard | SELECT t2.product_name, SUM(t1.product_quantity) FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_name |
1,407 | customers_and_invoices | spider | Show the order ids and the number of items in each order. | train | hard | SELECT order_id, COUNT(*) FROM order_items GROUP BY order_id |
1,408 | customers_and_invoices | spider | How many order items correspond to each order id? | train | hard | SELECT order_id, COUNT(*) FROM order_items GROUP BY order_id |
1,409 | customers_and_invoices | spider | Show the product ids and the number of unique orders containing each product. | train | hard | SELECT product_id, COUNT(DISTINCT order_id) FROM order_items GROUP BY product_id |
1,410 | customers_and_invoices | spider | How many distinct order ids correspond to each product? | train | hard | SELECT product_id, COUNT(DISTINCT order_id) FROM order_items GROUP BY product_id |
1,411 | customers_and_invoices | spider | Show all product names and the number of customers having an order on each product. | train | hard | SELECT t2.product_name, COUNT(*) FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id JOIN orders AS t3 ON t3.order_id = t1.order_id GROUP BY t2.product_name |
1,412 | customers_and_invoices | spider | What are teh names of the different products, as well as the number of customers who have ordered each product. | train | hard | SELECT t2.product_name, COUNT(*) FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id JOIN orders AS t3 ON t3.order_id = t1.order_id GROUP BY t2.product_name |
1,413 | customers_and_invoices | spider | Show order ids and the number of products in each order. | train | hard | SELECT order_id, COUNT(DISTINCT product_id) FROM order_items GROUP BY order_id |
1,414 | customers_and_invoices | spider | How many different products correspond to each order id? | train | hard | SELECT order_id, COUNT(DISTINCT product_id) FROM order_items GROUP BY order_id |
1,415 | customers_and_invoices | spider | Show order ids and the total quantity in each order. | train | hard | SELECT order_id, SUM(product_quantity) FROM order_items GROUP BY order_id |
1,416 | customers_and_invoices | spider | Give the order ids for all orders, as well as the total product quantity in each. | train | hard | SELECT order_id, SUM(product_quantity) FROM order_items GROUP BY order_id |
1,417 | customers_and_invoices | spider | How many products were not included in any order? | train | medium | SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM order_items) |
1,418 | customers_and_invoices | spider | Count the number of products that were never ordered. | train | medium | SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM order_items) |
1,419 | small_bank_1 | spider | Find the total savings balance of all accounts except the account with name ‘Brown’. | train | hard | SELECT SUM(t2.balance) FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t1.name <> 'brown' |
1,420 | small_bank_1 | spider | What is the total balance of savings accounts not belonging to someone with the name Brown? | train | hard | SELECT SUM(t2.balance) FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t1.name <> 'brown' |
1,421 | small_bank_1 | spider | How many accounts are there in total? | train | easy | SELECT COUNT(*) FROM accounts |
1,422 | small_bank_1 | spider | Count the number of accounts. | train | easy | SELECT COUNT(*) FROM accounts |
1,423 | small_bank_1 | spider | What is the total checking balance in all accounts? | train | easy | SELECT SUM(balance) FROM checking |
1,424 | small_bank_1 | spider | Find the total balance across checking accounts. | train | easy | SELECT SUM(balance) FROM checking |
1,425 | small_bank_1 | spider | Find the average checking balance. | train | easy | SELECT AVG(balance) FROM checking |
1,426 | small_bank_1 | spider | What is the average balance in checking accounts? | train | easy | SELECT AVG(balance) FROM checking |
1,427 | small_bank_1 | spider | How many accounts have a savings balance above the average savings balance? | train | easy | SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) |
1,428 | small_bank_1 | spider | Find the number of accounts with a savings balance that is higher than the average savings balance. | train | easy | SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) |
1,429 | small_bank_1 | spider | Find the name and id of accounts whose checking balance is below the maximum checking balance. | train | hard | SELECT t1.custid, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT MAX(balance) FROM checking) |
1,430 | small_bank_1 | spider | What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance? | train | hard | SELECT t1.custid, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT MAX(balance) FROM checking) |
1,431 | small_bank_1 | spider | What is the checking balance of the account whose owner’s name contains the substring ‘ee’? | train | hard | SELECT t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t1.name LIKE '%ee%' |
1,432 | small_bank_1 | spider | Find the balance of the checking account belonging to an owner whose name contains 'ee'. | train | hard | SELECT t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t1.name LIKE '%ee%' |
1,433 | small_bank_1 | spider | Find the checking balance and saving balance in the Brown’s account. | train | hard | SELECT t2.balance, t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t1.name = 'brown' |
1,434 | small_bank_1 | spider | What are the checking and savings balances in accounts belonging to Brown? | train | hard | SELECT t2.balance, t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t1.name = 'brown' |
1,435 | small_bank_1 | spider | Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT AVG(balance) FROM savings) |
1,436 | small_bank_1 | spider | What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance? | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT AVG(balance) FROM savings) |
1,437 | small_bank_1 | spider | Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | train | hard | SELECT t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t1.name IN (SELECT t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t2.balance > (SELECT AVG(balance) FROM savings)) |
1,438 | small_bank_1 | spider | What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance? | train | hard | SELECT t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t1.name IN (SELECT t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid WHERE t2.balance > (SELECT AVG(balance) FROM savings)) |
1,439 | small_bank_1 | spider | List all customers’ names in the alphabetical order. | train | hard | SELECT name FROM accounts ORDER BY name |
1,440 | small_bank_1 | spider | What are the names of all the customers in alphabetical order? | train | hard | SELECT name FROM accounts ORDER BY name |
1,441 | small_bank_1 | spider | Find the name of account that has the lowest total checking and saving balance. | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance + t3.balance LIMIT 1 |
1,442 | small_bank_1 | spider | What is the name corresponding to the accoung with the lowest sum of checking and savings balances? | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance + t3.balance LIMIT 1 |
1,443 | small_bank_1 | spider | Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | train | hard | SELECT t1.name, t2.balance + t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t3.balance > (SELECT AVG(balance) FROM savings) |
1,444 | small_bank_1 | spider | What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? | train | hard | SELECT t1.name, t2.balance + t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t3.balance > (SELECT AVG(balance) FROM savings) |
1,445 | small_bank_1 | spider | Find the name and checking balance of the account with the lowest savings balance. | train | hard | SELECT t1.name, t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t3.balance LIMIT 1 |
1,446 | small_bank_1 | spider | What are the names and balances of checking accounts belonging to the customer with the lowest savings balance? | train | hard | SELECT t1.name, t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t3.balance LIMIT 1 |
1,447 | small_bank_1 | spider | Find the number of checking accounts for each account name. | train | hard | SELECT COUNT(*), t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid GROUP BY t1.name |
1,448 | small_bank_1 | spider | What are the names of customers with accounts, and how many checking accounts do each of them have? | train | hard | SELECT COUNT(*), t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid GROUP BY t1.name |
1,449 | small_bank_1 | spider | Find the total saving balance for each account name. | train | hard | SELECT SUM(t2.balance), t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid GROUP BY t1.name |
1,450 | small_bank_1 | spider | What are the names of customers with accounts, and what are the total savings balances for each? | train | hard | SELECT SUM(t2.balance), t1.name FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid GROUP BY t1.name |
1,451 | small_bank_1 | spider | Find the name of accounts whose checking balance is below the average checking balance. | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT AVG(balance) FROM checking) |
1,452 | small_bank_1 | spider | What are the names of customers with checking balances lower than the average checking balance? | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid WHERE t2.balance < (SELECT AVG(balance) FROM checking) |
1,453 | small_bank_1 | spider | Find the saving balance of the account with the highest checking balance. | train | hard | SELECT t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance DESC LIMIT 1 |
1,454 | small_bank_1 | spider | What is the savings balance of the account belonging to the customer with the highest checking balance? | train | hard | SELECT t3.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance DESC LIMIT 1 |
1,455 | small_bank_1 | spider | Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | train | hard | SELECT t1.balance + t2.balance FROM checking AS t1 JOIN savings AS t2 ON t1.custid = t2.custid ORDER BY t1.balance + t2.balance |
1,456 | small_bank_1 | spider | What is the sum of checking and savings balances for all customers, ordered by the total balance? | train | hard | SELECT t1.balance + t2.balance FROM checking AS t1 JOIN savings AS t2 ON t1.custid = t2.custid ORDER BY t1.balance + t2.balance |
1,457 | small_bank_1 | spider | Find the name and checking balance of the account with the lowest saving balance. | train | hard | SELECT t2.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t3.balance LIMIT 1 |
1,458 | small_bank_1 | spider | What is the name and checking balance of the account which has the lowest savings balance? | train | hard | SELECT t2.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t3.balance LIMIT 1 |
1,459 | small_bank_1 | spider | Find the name, checking balance and saving balance of all accounts in the bank. | train | hard | SELECT t2.balance, t3.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid |
1,460 | small_bank_1 | spider | What are the names, checking balances, and savings balances for all customers? | train | hard | SELECT t2.balance, t3.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid |
1,461 | small_bank_1 | spider | Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order. | train | hard | SELECT t2.balance, t3.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance + t3.balance DESC |
1,462 | small_bank_1 | spider | What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? | train | hard | SELECT t2.balance, t3.balance, t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid ORDER BY t2.balance + t3.balance DESC |
1,463 | small_bank_1 | spider | Find the name of accounts whose checking balance is higher than corresponding saving balance. | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t2.balance > t3.balance |
1,464 | small_bank_1 | spider | What are the names of customers with a higher checking balance than savings balance? | train | hard | SELECT t1.name FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t2.balance > t3.balance |
1,465 | small_bank_1 | spider | Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | train | hard | SELECT t1.name, t3.balance + t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t3.balance < t2.balance |
1,466 | small_bank_1 | spider | What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances? | train | hard | SELECT t1.name, t3.balance + t2.balance FROM accounts AS t1 JOIN checking AS t2 ON t1.custid = t2.custid JOIN savings AS t3 ON t1.custid = t3.custid WHERE t3.balance < t2.balance |
1,467 | small_bank_1 | spider | Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | train | hard | SELECT t1.name, t2.balance FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid ORDER BY t2.balance DESC LIMIT 3 |
1,468 | small_bank_1 | spider | What are names and savings balances of the three accounts with the highest savings balances? | train | hard | SELECT t1.name, t2.balance FROM accounts AS t1 JOIN savings AS t2 ON t1.custid = t2.custid ORDER BY t2.balance DESC LIMIT 3 |
1,469 | school_finance | spider | How many schools are there? | train | easy | SELECT COUNT(*) FROM school |
1,470 | school_finance | spider | Count the number of schools. | train | easy | SELECT COUNT(*) FROM school |
1,471 | school_finance | spider | Show all school names in alphabetical order. | train | hard | SELECT school_name FROM school ORDER BY school_name |
1,472 | school_finance | spider | List the name, location, mascot for all schools. | train | easy | SELECT school_name, location, mascot FROM school |
1,473 | school_finance | spider | What are the total and average enrollment of all schools? | train | easy | SELECT SUM(enrollment), AVG(enrollment) FROM school |
1,474 | school_finance | spider | What are the mascots for schools with enrollments above the average? | train | easy | SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) |
1,475 | school_finance | spider | List the name of the school with the smallest enrollment. | train | hard | SELECT school_name FROM school ORDER BY enrollment LIMIT 1 |
1,476 | school_finance | spider | Show the average, maximum, minimum enrollment of all schools. | train | easy | SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school |
1,477 | school_finance | spider | Show each county along with the number of schools and total enrollment in each county. | train | hard | SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county |
1,478 | school_finance | spider | How many donors have endowment for school named "Glenn"? | train | hard | SELECT COUNT(DISTINCT t1.donator_name) FROM endowment AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t2.school_name = 'glenn' |
1,479 | school_finance | spider | List each donator name and the amount of endowment in descending order of the amount of endowment. | train | hard | SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC |
1,480 | school_finance | spider | List the names of the schools without any endowment. | train | easy | SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment) |
1,481 | school_finance | spider | List all the names of schools with an endowment amount smaller than or equal to 10. | train | hard | SELECT t2.school_name FROM endowment AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id GROUP BY t1.school_id HAVING SUM(t1.amount) <= 10 |
1,482 | school_finance | spider | Show the names of donors who donated to both school "Glenn" and "Triton." | train | hard | SELECT t1.donator_name FROM endowment AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t2.school_name = 'glenn' INTERSECT SELECT t1.donator_name FROM endowment AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t2.school_name = 'triton' |
1,483 | school_finance | spider | Show the names of all the donors except those whose donation amount less than 9. | train | easy | SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9 |
1,484 | school_finance | spider | List the amount and donor name for the largest amount of donation. | train | hard | SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1 |
1,485 | school_finance | spider | How many budgets are above 3000 in year 2001 or before? | train | medium | SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND year <= 2001 |
1,486 | school_finance | spider | Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000 | train | medium | SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND year <= 2001 |
1,487 | school_finance | spider | Show each school name, its budgeted amount, and invested amount in year 2002 or after. | train | hard | SELECT t2.school_name, t1.budgeted, t1.invested FROM budget AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t1.year >= 2002 |
1,488 | school_finance | spider | Show all donor names. | train | easy | SELECT DISTINCT donator_name FROM endowment |
1,489 | school_finance | spider | How many budget record has a budget amount smaller than the invested amount? | train | easy | SELECT COUNT(*) FROM budget WHERE budgeted < invested |
1,490 | school_finance | spider | What is the total budget amount for school "Glenn" in all years? | train | hard | SELECT SUM(t1.budgeted) FROM budget AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t2.school_name = 'glenn' |
1,491 | school_finance | spider | Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. | train | hard | SELECT t2.school_name FROM budget AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id JOIN endowment AS t3 ON t2.school_id = t3.school_id GROUP BY t2.school_name HAVING SUM(t1.budgeted) > 100 OR SUM(t3.amount) > 10 |
1,492 | school_finance | spider | Find the names of schools that have more than one donator with donation amount above 8.5. | train | hard | SELECT t2.school_name FROM endowment AS t1 JOIN school AS t2 ON t1.school_id = t2.school_id WHERE t1.amount > 8.5 GROUP BY t1.school_id HAVING COUNT(*) > 1 |
1,493 | school_finance | spider | Find the number of schools that have more than one donator whose donation amount is less than 8.5. | train | easy | SELECT COUNT(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING COUNT(*) > 1) |
1,494 | school_finance | spider | List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. | train | hard | SELECT t1.school_name, t1.mascot, t1.ihsaa_football_class FROM school AS t1 JOIN budget AS t2 ON t1.school_id = t2.school_id WHERE budgeted > 6000 OR year < 2003 ORDER BY t2.total_budget_percent_invested, t2.total_budget_percent_budgeted |
1,495 | restaurant_1 | spider | Show me all the restaurants. | train | easy | SELECT resname FROM restaurant |
1,496 | restaurant_1 | spider | What is the address of the restaurant Subway? | train | easy | SELECT address FROM restaurant WHERE resname = 'subway' |
1,497 | restaurant_1 | spider | What is the rating of the restaurant Subway? | train | easy | SELECT rating FROM restaurant WHERE resname = 'subway' |
1,498 | restaurant_1 | spider | List all restaurant types. | train | easy | SELECT restypename FROM restaurant_type |
1,499 | restaurant_1 | spider | What is the description of the restaurant type Sandwich? | train | medium | SELECT restypedescription FROM restaurant_type WHERE restypename = 'sandwich' |
1,500 | restaurant_1 | spider | Which restaurants have highest rating? List the restaurant name and its rating. | train | hard | SELECT resname, rating FROM restaurant ORDER BY rating DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.