minktn/spider-data huggingface dataset:
Database: workshop_paper
Question: Which authors did not submit to any workshop?
SQL: SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)
Database: tracking_share_transactions
Question: Find the number of investors in total.
SQL: SELECT count(*) FROM INVESTORS
Database: tracking_share_transactions
Question: Show all investor details.
SQL: SELECT Investor_details FROM INVESTORS
Database: tracking_share_transactions
Question: Show all distinct lot details.
SQL: SELECT DISTINCT lot_details FROM LOTS
Database: tracking_share_transactions
Question: Show the maximum amount of transaction.
SQL: SELECT max(amount_of_transaction) FROM TRANSACTIONS
Database: tracking_share_transactions
Question: Show all date and share count of transactions.
SQL: SELECT date_of_transaction ,  share_count FROM TRANSACTIONS
Database: tracking_share_transactions
Question: What is the total share of transactions?
SQL: SELECT sum(share_count) FROM TRANSACTIONS
Database: tracking_share_transactions
Question: Show all transaction ids with transaction code 'PUR'.
SQL: SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code  =  'PUR'
Database: tracking_share_transactions
Question: Show all dates of transactions whose type code is "SALE".
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code  =  "SALE"
Database: tracking_share_transactions
Question: Show the average amount of transactions with type code "SALE".
SQL: SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "SALE"
Database: tracking_share_transactions
Question: Show the description of transaction type with code "PUR".
SQL: SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code	  =  "PUR"
Database: tracking_share_transactions
Question: Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50.
SQL: SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "PUR" AND share_count  >  50
Database: tracking_share_transactions
Question: Show the maximum share count of transactions where the amount is smaller than 10000
SQL: SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction  <  10000
Database: tracking_share_transactions
Question: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count  >  100 OR amount_of_transaction  >  1000
Database: tracking_share_transactions
Question: Show the transaction type descriptions and dates if the share count is smaller than 10.
SQL: SELECT T1.transaction_type_description ,  T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code  =  T2.transaction_type_code WHERE T2.share_count  <  10
Database: tracking_share_transactions
Question: Show details of all investors if they make any transaction with share count greater than 100.
SQL: SELECT T1.Investor_details FROM  INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id WHERE T2.share_count  >  100
Database: tracking_share_transactions
Question: How many distinct transaction types are used in the transactions?
SQL: SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS
Database: tracking_share_transactions
Question: Return the lot details and investor ids.
SQL: SELECT lot_details ,  investor_id FROM LOTS
Database: tracking_share_transactions
Question: Return the lot details of lots that belong to investors with details "l"?
SQL: SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON  T1.investor_id  =  T2.investor_id WHERE T1.Investor_details  =  "l"
Database: tracking_share_transactions
Question: What are the purchase details of transactions with amount bigger than 10000?
SQL: SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id  =  T2.transaction_id WHERE T2.amount_of_transaction  >  10000
Database: tracking_share_transactions
Question: What are the sale details and dates of transactions with amount smaller than 3000?
SQL: SELECT T1.sales_details ,  T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id  =  T2.transaction_id WHERE T2.amount_of_transaction  <  3000
Database: tracking_share_transactions
Question: What are the lot details of lots associated with transactions with share count smaller than 50?
SQL: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  <  50
Database: tracking_share_transactions
Question: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?
SQL: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON  T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  >  100 AND T3.transaction_type_code  =  "PUR"
Database: tracking_share_transactions
Question: Show the average transaction amount for different transaction types.
SQL: SELECT transaction_type_code ,  avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code
Database: tracking_share_transactions
Question: Show the maximum and minimum share count of different transaction types.
SQL: SELECT transaction_type_code ,  max(share_count) ,  min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code
Database: tracking_share_transactions
Question: Show the average share count of transactions for different investors.
SQL: SELECT investor_id ,  avg(share_count) FROM TRANSACTIONS GROUP BY investor_id
Database: tracking_share_transactions
Question: Show the average share count of transactions each each investor, ordered by average share count.
SQL: SELECT investor_id ,  avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)
Database: tracking_share_transactions
Question: Show the average amount of transactions for different investors.
SQL: SELECT investor_id ,  avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id
Database: tracking_share_transactions
Question: Show the average amount of transactions for different lots.
SQL: SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id
Database: tracking_share_transactions
Question: Show the average amount of transactions for different lots, ordered by average amount of transactions.
SQL: SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)
Database: tracking_share_transactions
Question: Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0.
SQL: SELECT investor_id ,  COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code  =  "SALE" GROUP BY investor_id
Database: tracking_share_transactions
Question: Show the number of transactions for different investors.
SQL: SELECT investor_id ,  COUNT(*) FROM TRANSACTIONS GROUP BY investor_id
Database: tracking_share_transactions
Question: Show the transaction type code that occurs the fewest times.
SQL: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1
Database: tracking_share_transactions
Question: Show the transaction type code that occurs the most frequently.
SQL: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
Database: tracking_share_transactions
Question: Show the description of the transaction type that occurs most frequently.
SQL: SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code  =  T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
Database: tracking_share_transactions
Question: Show the id and details of the investor that has the largest number of transactions.
SQL: SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1
Database: tracking_share_transactions
Question: Show the id and details for the investors who have the top 3 number of transactions.
SQL: SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3
Database: tracking_share_transactions
Question: Show the ids of the investors who have at least two transactions.
SQL: SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*)  >=  2
Database: tracking_share_transactions
Question: Show the ids and details of the investors who have at least two transactions with type code "SALE".
SQL: SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id WHERE T2.transaction_type_code  =  "SALE" GROUP BY T2.investor_id HAVING COUNT(*)  >=  2
Database: tracking_share_transactions
Question: What are the dates of transactions with at least 100 share count or amount bigger than 100?
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count  >=  100 OR amount_of_transaction  >=  100
Database: tracking_share_transactions
Question: What are the details of all sales and purchases?
SQL: SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases
Database: tracking_share_transactions
Question: What are the details of the lots which are not used in any transactions?
SQL: SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id  =  T2.lot_id
Database: cre_Theme_park
Question: How many available hotels are there in total?
SQL: SELECT count(*) FROM HOTELS
Database: cre_Theme_park
Question: Find the total number of available hotels.
SQL: SELECT count(*) FROM HOTELS
Database: cre_Theme_park
Question: What are the price ranges of hotels?
SQL: SELECT price_range FROM HOTELS
Database: cre_Theme_park
Question: Tell me the price ranges for all the hotels.
SQL: SELECT price_range FROM HOTELS
Database: cre_Theme_park
Question: Show all distinct location names.
SQL: SELECT DISTINCT Location_Name FROM LOCATIONS
Database: cre_Theme_park
Question: What are the distinct location names?
SQL: SELECT DISTINCT Location_Name FROM LOCATIONS
Database: cre_Theme_park
Question: Show the names and details of all the staff members.
SQL: SELECT Name ,  Other_Details FROM Staff
Database: cre_Theme_park
Question: What is the name and detail of each staff member?
SQL: SELECT Name ,  Other_Details FROM Staff
Database: cre_Theme_park
Question: Show details of all visitors.
SQL: SELECT Tourist_Details FROM VISITORS
Database: cre_Theme_park
Question: What is the detail of each visitor?
SQL: SELECT Tourist_Details FROM VISITORS
Database: cre_Theme_park
Question: Show the price ranges of hotels with 5 star ratings.
SQL: SELECT price_range FROM HOTELS WHERE star_rating_code  =  "5"
Database: cre_Theme_park
Question: What are the price ranges of five star hotels?
SQL: SELECT price_range FROM HOTELS WHERE star_rating_code  =  "5"
Database: cre_Theme_park
Question: Show the average price range of hotels that have 5 star ratings and allow pets.
SQL: SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  1
Database: cre_Theme_park
Question: What is the average price range of five star hotels that allow pets?
SQL: SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  1
Database: cre_Theme_park
Question: What is the address of the location "UK Gallery"?
SQL: SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"
Database: cre_Theme_park
Question: Find the address of the location named "UK Gallery".
SQL: SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"
Database: cre_Theme_park
Question: What is the detail of the location UK Gallery?
SQL: SELECT Other_Details FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"
Database: cre_Theme_park
Question: Return the detail of the location named "UK Gallery".
SQL: SELECT Other_Details FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"
Database: cre_Theme_park
Question: Which location names contain the word "film"?
SQL: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"
Database: cre_Theme_park
Question: Find all the locations whose names contain the word "film".
SQL: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"
Database: cre_Theme_park
Question: How many distinct names are associated with all the photos?
SQL: SELECT count(DISTINCT Name) FROM PHOTOS
Database: cre_Theme_park
Question: Count the number of distinct names associated with the photos.
SQL: SELECT count(DISTINCT Name) FROM PHOTOS
Database: cre_Theme_park
Question: What are the distinct visit dates?
SQL: SELECT DISTINCT Visit_Date FROM VISITS
Database: cre_Theme_park
Question: Find all the distinct visit dates.
SQL: SELECT DISTINCT Visit_Date FROM VISITS
Database: cre_Theme_park
Question: What are the names of the tourist attractions that can be accessed by bus?
SQL: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: Which tourist attractions can we get to by bus? Tell me the names of the attractions.
SQL: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?
SQL: SELECT Name ,  Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus" OR How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: Find the names and opening hours of the tourist attractions that we get to by bus or walk.
SQL: SELECT Name ,  Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus" OR How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: What are the star rating descriptions of the hotels with price above 10000?
SQL: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code  =  T2.star_rating_code WHERE T1.price_range  >  10000
Database: cre_Theme_park
Question: Give me the star rating descriptions of the hotels that cost more than 10000.
SQL: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code  =  T2.star_rating_code WHERE T1.price_range  >  10000
Database: cre_Theme_park
Question: What are the details and opening hours of the museums?
SQL: SELECT T1.Museum_Details ,  T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID  =  T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: Give me the detail and opening hour for each museum.
SQL: SELECT T1.Museum_Details ,  T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID  =  T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: What is the name of the tourist attraction that is associated with the photo "game1"?
SQL: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T1.Name  =  "game1"
Database: cre_Theme_park
Question: Which tourist attraction is associated with the photo "game1"? Return its name.
SQL: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T1.Name  =  "game1"
Database: cre_Theme_park
Question: What are the names and descriptions of the photos taken at the tourist attraction "film festival"?
SQL: SELECT T1.Name ,  T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "film festival"
Database: cre_Theme_park
Question: Find the names and descriptions of the photos taken at the tourist attraction called "film festival".
SQL: SELECT T1.Name ,  T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "film festival"
Database: cre_Theme_park
Question: What are the details and ways to get to tourist attractions related to royal family?
SQL: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: Which tourist attractions are related to royal family? Tell me their details and how we can get there.
SQL: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: What are the details of the shops that can be accessed by walk?
SQL: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: Find the details of the shops that can be reached by walk.
SQL: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: What is the name of the staff that is in charge of the attraction named "US museum"?
SQL: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum"
Database: cre_Theme_park
Question: Tell me the name of the staff in charge of the attraction called "US museum".
SQL: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum"
Database: cre_Theme_park
Question: What are the details of the markets that can be accessed by walk or bus?
SQL: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" OR  T2.How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: Find the details of all the markets that are accessible by walk or bus.
SQL: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" OR  T2.How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: What are the visit date and details of the visitor whose detail is 'Vincent'?
SQL: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent"
Database: cre_Theme_park
Question: Find the visit date and details of the tourist whose detail is 'Vincent'
SQL: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent"
Database: cre_Theme_park
Question: Which tourist attractions does the visitor with detail 'Vincent' visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent"
Database: cre_Theme_park
Question: Show the tourist attractions visited by the tourist whose detail is 'Vincent'.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent"
Database: cre_Theme_park
Question: What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?
SQL: SELECT T1.Name ,  T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" OR T2.Tourist_Details  =  "Vivian"
Database: cre_Theme_park
Question: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.
SQL: SELECT T1.Name ,  T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" OR T2.Tourist_Details  =  "Vivian"
Database: cre_Theme_park
Question: Show the average price of hotels for each star rating code.
SQL: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code
Database: cre_Theme_park
Question: What is the average price range of hotels for each each star rating code?
SQL: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code
Database: cre_Theme_park
Question: Show the average price of hotels for different pet policy.
SQL: SELECT pets_allowed_yn ,  avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn
Database: cre_Theme_park
Question: What are the average prices of hotels grouped by their pet policy.
SQL: SELECT pets_allowed_yn ,  avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn
Database: cre_Theme_park
Question: Show the id and star rating of each hotel, ordered by its price from low to high.
SQL: SELECT hotel_id ,  star_rating_code FROM HOTELS ORDER BY price_range ASC
Database: cre_Theme_park
Question: Find the id and star rating of each hotel and sort them in increasing order of price.
SQL: SELECT hotel_id ,  star_rating_code FROM HOTELS ORDER BY price_range ASC
Database: cre_Theme_park
Question: Show the details of the top 3 most expensive hotels.
SQL: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
Database: cre_Theme_park
Question: What are the details of the three most expensive hotels?
SQL: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
Database: cre_Theme_park
Question: Show the details and star ratings of the 3 least expensive hotels.
SQL: SELECT other_hotel_details ,  star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3
Database: cre_Theme_park
Question: What are the details and star ratings of the three hotels with the lowest price ranges?
SQL: SELECT other_hotel_details ,  star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3
Database: cre_Theme_park
Question: Show the transportation method most people choose to get to tourist attractions.
SQL: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Theme_park
Question: Which transportation method is used the most often to get to tourist attractions?
SQL: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Theme_park
Question: Show the description and code of the attraction type most tourist attractions belong to.
SQL: SELECT T1.Attraction_Type_Description ,  T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code  =  T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Theme_park
Question: Which attraction type does the most tourist attractions belong to? Tell me its  attraction type description and code.
SQL: SELECT T1.Attraction_Type_Description ,  T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code  =  T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Theme_park
Question: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.
SQL: SELECT How_to_Get_There ,  COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
Database: cre_Theme_park
Question: List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.
SQL: SELECT How_to_Get_There ,  COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
Database: cre_Theme_park
Question: Show different tourist attractions' names, ids, and the corresponding number of visits.
SQL: SELECT T1.Name ,  T2.Tourist_Attraction_ID ,   COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: What are the name, id and the corresponding number of visits for each  tourist attraction?
SQL: SELECT T1.Name ,  T2.Tourist_Attraction_ID ,   COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID
Database: cre_Theme_park
Question: Show the names and ids of tourist attractions that are visited at least two times.
SQL: SELECT T1.Name ,  T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  >=  2
Database: cre_Theme_park
Question: Which tourist attractions are visited at least twice? Give me their names and ids.
SQL: SELECT T1.Name ,  T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  >=  2
Database: cre_Theme_park
Question: Show the names and ids of tourist attractions that are visited at most once.
SQL: SELECT T1.Name ,  T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  <=  1
Database: cre_Theme_park
Question: What are the names and ids of the tourist attractions that are visited at most once?
SQL: SELECT T1.Name ,  T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  <=  1
Database: cre_Theme_park
Question: What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "660 Shea Crescent" OR T2.How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "660 Shea Crescent" OR T2.How_to_Get_There  =  "walk"
Database: cre_Theme_park
Question: What are the names of the tourist attractions that have parking or shopping as their feature details?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'
Database: cre_Theme_park
Question: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'
Database: cre_Theme_park
Question: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "254 Ottilie Junction" OR T2.How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.
SQL: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "254 Ottilie Junction" OR T2.How_to_Get_There  =  "bus"
Database: cre_Theme_park
Question: What are the names of the tourist attractions Vincent and Marcelle visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Marcelle"
Database: cre_Theme_park
Question: Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Marcelle"
Database: cre_Theme_park
Question: What are the names of tourist attraction that Alison visited but Rosalind did not visit?
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Rosalind"
Database: cre_Theme_park
Question: Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Rosalind"
Database: cre_Theme_park
Question: How many tourists did not make any visit?
SQL: SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
Database: cre_Theme_park
Question: Count the number of tourists who did not visit any place.
SQL: SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
Database: game_1
Question: How many video games exist?
SQL: SELECT count(*) FROM Video_games
Database: game_1
Question: How many video games do you have?
SQL: SELECT count(*) FROM Video_games
Database: game_1
Question: How many video game types exist?
SQL: SELECT count(DISTINCT gtype) FROM Video_games
Database: game_1
Question: What is the count of different game types?
SQL: SELECT count(DISTINCT gtype) FROM Video_games
Database: game_1
Question: Show all video game types.
SQL: SELECT DISTINCT gtype FROM Video_games
Database: game_1
Question: What are the different types of video games?
SQL: SELECT DISTINCT gtype FROM Video_games
Database: game_1
Question: Show all video games and their types in the order of their names.
SQL: SELECT gname ,  gtype FROM Video_games ORDER BY gname
Database: game_1
Question: What are the names of all the video games and their types in alphabetical order?
SQL: SELECT gname ,  gtype FROM Video_games ORDER BY gname
Database: game_1
Question: Show all video games with type Collectible card game.
SQL: SELECT gname FROM Video_games WHERE gtype  =  "Collectible card game"
Database: game_1
Question: What are the names of all video games that are collectible cards?
SQL: SELECT gname FROM Video_games WHERE gtype  =  "Collectible card game"
Database: game_1
Question: What is the type of video game Call of Destiny.
SQL: SELECT gtype FROM Video_games WHERE gname  =  "Call of Destiny"
Database: game_1
Question: What type of game is Call of Destiny?
SQL: SELECT gtype FROM Video_games WHERE gname  =  "Call of Destiny"
Database: game_1
Question: How many video games have type Massively multiplayer online game?
SQL: SELECT count(*) FROM Video_games WHERE gtype  =  "Massively multiplayer online game"
Database: game_1
Question: Count the number of video games with Massively multiplayer online game type .
SQL: SELECT count(*) FROM Video_games WHERE gtype  =  "Massively multiplayer online game"
Database: game_1
Question: Show all video game types and the number of video games in each type.
SQL: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
Database: game_1
Question: What are the types of video games and how many are in each type?
SQL: SELECT gtype ,  count(*) FROM Video_games GROUP BY gtype
Database: game_1
Question: Which game type has most number of games?
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: What type has the most games?
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: Which game type has least number of games?
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
Database: game_1
Question: What is the type with the fewest games?
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
Database: game_1
Question: Show ids for all students who live in CHI.
SQL: SELECT StuID FROM Student WHERE city_code  =  "CHI"
Database: game_1
Question: What are the ids of all students who live in CHI?
SQL: SELECT StuID FROM Student WHERE city_code  =  "CHI"
Database: game_1
Question: Show ids for all students who have advisor 1121.
SQL: SELECT StuID FROM Student WHERE Advisor  =  1121
Database: game_1
Question: What are the ids of all students who have advisor number 1121?
SQL: SELECT StuID FROM Student WHERE Advisor  =  1121
Database: game_1
Question: Show first name for all students with major 600.
SQL: SELECT Fname FROM Student WHERE Major  =  600
Database: game_1
Question: What are the first names for all students who are from the major numbered 600?
SQL: SELECT Fname FROM Student WHERE Major  =  600
Database: game_1
Question: Show the average, minimum, and maximum age for different majors.
SQL: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
Database: game_1
Question: What are the average, minimum, and max ages for each of the different majors?
SQL: SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major
Database: game_1
Question: Show all advisors who have at least two students.
SQL: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2
Database: game_1
Question: What are the advisors
SQL: SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2
Database: game_1
Question: How many sports do we have?
SQL: SELECT count(DISTINCT sportname) FROM Sportsinfo
Database: game_1
Question: How many different types of sports do we offer?
SQL: SELECT count(DISTINCT sportname) FROM Sportsinfo
Database: game_1
Question: How many students play sports?
SQL: SELECT count(DISTINCT StuID) FROM Sportsinfo
Database: game_1
Question: How many different students are involved in sports?
SQL: SELECT count(DISTINCT StuID) FROM Sportsinfo
Database: game_1
Question: List ids for all student who are on scholarship.
SQL: SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'
Database: game_1
Question: What are the ids for all sporty students who are on scholarship?
SQL: SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'
Database: game_1
Question: Show last names for all student who are on scholarship.
SQL: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.onscholarship  =  'Y'
Database: game_1
Question: What are the last names for all scholarship students?
SQL: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.onscholarship  =  'Y'
Database: game_1
Question: How many games are played for all students?
SQL: SELECT sum(gamesplayed) FROM Sportsinfo
Database: game_1
Question: What is the total number of games played?
SQL: SELECT sum(gamesplayed) FROM Sportsinfo
Database: game_1
Question: How many games are played for all football games by students on scholarship?
SQL: SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname  =  "Football" AND onscholarship  =  'Y'
Database: game_1
Question: What is the total number of all football games played by scholarship students?
SQL: SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname  =  "Football" AND onscholarship  =  'Y'
Database: game_1
Question: Show all sport name and the number of students.
SQL: SELECT sportname ,  count(*) FROM Sportsinfo GROUP BY sportname
Database: game_1
Question: How many students play each sport?
SQL: SELECT sportname ,  count(*) FROM Sportsinfo GROUP BY sportname
Database: game_1
Question: Show all student IDs with the number of sports and total number of games played
SQL: SELECT StuID ,  count(*) ,  sum(gamesplayed) FROM Sportsinfo GROUP BY StuID
Database: game_1
Question: What are the ids of all students along with how many sports and games did they play?
SQL: SELECT StuID ,  count(*) ,  sum(gamesplayed) FROM Sportsinfo GROUP BY StuID
Database: game_1
Question: Show all student IDs with more than total 10 hours per week on all sports played.
SQL: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek)  >  10
Database: game_1
Question: What are the student IDs for everybody who worked for more than 10 hours per week on all sports?
SQL: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek)  >  10
Database: game_1
Question: What is the first name and last name of the student who have most number of sports?
SQL: SELECT T2.Fname ,  T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: What is the first and last name of the student who played the most sports?
SQL: SELECT T2.Fname ,  T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: Which sport has most number of students on scholarship?
SQL: SELECT sportname FROM Sportsinfo WHERE onscholarship  =  'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: What is the sport with the most scholarship students?
SQL: SELECT sportname FROM Sportsinfo WHERE onscholarship  =  'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1
Database: game_1
Question: Show student ids who don't have any sports.
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo
Database: game_1
Question: What are the ids of all students who don't play sports?
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo
Database: game_1
Question: Show student ids who are on scholarship and have major 600.
SQL: SELECT StuID FROM Student WHERE major  =  600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'
Database: game_1
Question: What are the student ids for those on scholarship in major number 600?
SQL: SELECT StuID FROM Student WHERE major  =  600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'
Database: game_1
Question: Show student ids who are female and play football.
SQL: SELECT StuID FROM Student WHERE sex  =  'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname  =  "Football"
Database: game_1
Question: What are the ids of all female students who play football?
SQL: SELECT StuID FROM Student WHERE sex  =  'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname  =  "Football"
Database: game_1
Question: Show all male student ids who don't play football.
SQL: SELECT StuID FROM Student WHERE sex  =  'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname  =  "Football"
Database: game_1
Question: What are the ids of all male students who do not play football?
SQL: SELECT StuID FROM Student WHERE sex  =  'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname  =  "Football"
Database: game_1
Question: Show total hours per week and number of games played for student David Shieber.
SQL: SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.Fname  =  "David" AND T2.Lname  =  "Shieber"
Database: game_1
Question: What is the total number of hours per work and number of games played by David Shieber?
SQL: SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.Fname  =  "David" AND T2.Lname  =  "Shieber"
Database: game_1
Question: Show total hours per week and number of games played for students under 20.
SQL: SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.age  <  20
Database: game_1
Question: What is the total number of hours per week and number of games played by students under 20?
SQL: SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.age  <  20
Database: game_1
Question: How many students play video games?
SQL: SELECT count(DISTINCT StuID) FROM Plays_games
Database: game_1
Question: How many different students play games?
SQL: SELECT count(DISTINCT StuID) FROM Plays_games
Database: game_1
Question: Show ids of students who don't play video game.
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games
Database: game_1
Question: What are the ids of all students who are not video game players?
SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games
Database: game_1
Question: Show ids of students who play video game and play sports.
SQL: SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
Database: game_1
Question: What are the ids of all students who played video games and sports?
SQL: SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
Database: game_1
Question: Show all game ids and the number of hours played.
SQL: SELECT gameid ,  sum(hours_played) FROM Plays_games GROUP BY gameid
Database: game_1
Question: What are ids and total number of hours played for each game?
SQL: SELECT gameid ,  sum(hours_played) FROM Plays_games GROUP BY gameid
Database: game_1
Question: Show all student ids and the number of hours played.
SQL: SELECT Stuid ,  sum(hours_played) FROM Plays_games GROUP BY Stuid
Database: game_1
Question: What are the ids of all students and number of hours played?
SQL: SELECT Stuid ,  sum(hours_played) FROM Plays_games GROUP BY Stuid
Database: game_1
Question: Show the game name that has most number of hours played.
SQL: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1
Database: game_1
Question: What is the name of the game that has been played the most?
SQL: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1
Database: game_1
Question: Show all game names played by at least 1000 hours.
SQL: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid GROUP BY T1.gameid HAVING sum(hours_played)  >=  1000
Database: game_1
Question: What are the names of all the games that have been played for at least 1000 hours?
SQL: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid GROUP BY T1.gameid HAVING sum(hours_played)  >=  1000
Database: game_1
Question: Show all game names played by Linda Smith
SQL: SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid JOIN Student AS T3 ON T3.Stuid  =  T1.Stuid WHERE T3.Lname  =  "Smith" AND T3.Fname  =  "Linda"
Database: game_1
Question: What are the names of all games played by Linda Smith?
SQL: SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid JOIN Student AS T3 ON T3.Stuid  =  T1.Stuid WHERE T3.Lname  =  "Smith" AND T3.Fname  =  "Linda"
Database: game_1
Question: Find the last and first name of students who are playing Football or Lacrosse.
SQL: SELECT T2.lname ,  T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.SportName  =  "Football" OR T1.SportName  =  "Lacrosse"
Database: game_1
Question: What is the first and last name of all students who play Football or Lacrosse?
SQL: SELECT T2.lname ,  T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.SportName  =  "Football" OR T1.SportName  =  "Lacrosse"
Database: game_1
Question: Find the first name and age of the students who are playing both Football and Lacrosse.
SQL: SELECT fname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName  =  "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName  =  "Lacrosse")
Database: game_1
Question: What are the first names and ages of all students who are playing both Football and Lacrosse?
SQL: SELECT fname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName  =  "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName  =  "Lacrosse")
Database: game_1
Question: Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.
SQL: SELECT lname ,  sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Works of Widenius")
Database: game_1
Question: what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?
SQL: SELECT lname ,  sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Works of Widenius")
Database: customers_and_addresses
Question: Find the name of all customers.
SQL: SELECT customer_name FROM customers
Database: customers_and_addresses
Question: What are the names of all the customers?
SQL: SELECT customer_name FROM customers
Database: customers_and_addresses
Question: How many customers are there?
SQL: SELECT count(*) FROM customers
Database: customers_and_addresses
Question: Return the total number of distinct customers.
SQL: SELECT count(*) FROM customers
Database: customers_and_addresses
Question: What is the average amount of items ordered in each order?
SQL: SELECT avg(order_quantity) FROM order_items
Database: customers_and_addresses
Question: Find the average order quantity per order.
SQL: SELECT avg(order_quantity) FROM order_items
Database: customers_and_addresses
Question: What are the names of customers who use payment method "Cash"?
SQL: SELECT customer_name FROM customers WHERE payment_method  =  "Cash"
Database: customers_and_addresses
Question: Which customers use "Cash" for payment method? Return the customer names.
SQL: SELECT customer_name FROM customers WHERE payment_method  =  "Cash"
Database: customers_and_addresses
Question: Find the "date became customers" of the customers whose ID is between 10 and 20.
SQL: SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20
Database: customers_and_addresses
Question: What are the dates when customers with ids between 10 and 20 became customers?
SQL: SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20
Database: customers_and_addresses
Question: Which payment method is used by most customers?
SQL: SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1