cnatale/presto-athena-txt-2-sql huggingface dataset:
Find the number of complaints with Product Failure type for each complaint status.
Additional table information: table: customer_complaints
SQL: SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code
Of complaints with the type code 'Product Failure', how many had each different status code?
Additional table information: table: customer_complaints
SQL: SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code
What is first names of the top 5 staff who have handled the greatest number of complaints?
Additional table information: table: customer_complaints
SQL: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5
Return the first names of the 5 staff members who have handled the most complaints.
Additional table information: table: customer_complaints
SQL: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5
Which state has the most customers?
Additional table information: table: customer_complaints
SQL: SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1
Give the state that has the most customers.
Additional table information: table: customer_complaints
SQL: SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1
How many submissions are there?
Additional table information: table: workshop_paper
SQL: SELECT COUNT(*) FROM submission
Count the number of submissions.
Additional table information: table: workshop_paper
SQL: SELECT COUNT(*) FROM submission
List the authors of submissions in ascending order of scores.
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST
Find the author for each submission and list them in ascending order of submission score.
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST
What are the authors of submissions and their colleges?
Additional table information: table: workshop_paper
SQL: SELECT Author, College FROM submission
For each submission, show the author and their affiliated college.
Additional table information: table: workshop_paper
SQL: SELECT Author, College FROM submission
Show the names of authors from college 'Florida' or 'Temple'
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'
Which authors with submissions are from college 'Florida' or 'Temple'?
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'
What is the average score of submissions?
Additional table information: table: workshop_paper
SQL: SELECT AVG(Scores) FROM submission
Compute the average score of submissions.
Additional table information: table: workshop_paper
SQL: SELECT AVG(Scores) FROM submission
What is the author of the submission with the highest score?
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
Find the author who achieved the highest score in a submission.
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
Show different colleges along with the number of authors of submission from each college.
Additional table information: table: workshop_paper
SQL: SELECT College, COUNT(*) FROM submission GROUP BY College
For each college, return the college name and the count of authors with submissions from that college.
Additional table information: table: workshop_paper
SQL: SELECT College, COUNT(*) FROM submission GROUP BY College
Show the most common college of authors of submissions.
Additional table information: table: workshop_paper
SQL: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1
Which college has the most authors with submissions?
Additional table information: table: workshop_paper
SQL: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1
Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.
Additional table information: table: workshop_paper
SQL: SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80
Which colleges have both authors with submission score above 90 and authors with submission score below 80?
Additional table information: table: workshop_paper
SQL: SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80
Show the authors of submissions and the acceptance results of their submissions.
Additional table information: table: workshop_paper
SQL: SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID
For each submission, find its author and acceptance result.
Additional table information: table: workshop_paper
SQL: SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID
Show the result of the submission with the highest score.
Additional table information: table: workshop_paper
SQL: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1
Which submission received the highest score in acceptance result. Show me the result.
Additional table information: table: workshop_paper
SQL: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1
Show each author and the number of workshops they submitted to.
Additional table information: table: workshop_paper
SQL: SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
How many workshops did each author submit to? Return the author name and the number of workshops.
Additional table information: table: workshop_paper
SQL: SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
Show the authors who have submissions to more than one workshop.
Additional table information: table: workshop_paper
SQL: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1
Which authors have submitted to more than one workshop?
Additional table information: table: workshop_paper
SQL: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1
Show the date and venue of each workshop in ascending alphabetical order of the venue.
Additional table information: table: workshop_paper
SQL: SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST
Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.
Additional table information: table: workshop_paper
SQL: SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST
List the authors who do not have submission to any workshop.
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)
Which authors did not submit to any workshop?
Additional table information: table: workshop_paper
SQL: SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)
Find the number of investors in total.
Additional table information: table: tracking_share_transactions
SQL: SELECT COUNT(*) FROM INVESTORS
Show all investor details.
Additional table information: table: tracking_share_transactions
SQL: SELECT Investor_details FROM INVESTORS
Show all distinct lot details.
Additional table information: table: tracking_share_transactions
SQL: SELECT DISTINCT lot_details FROM LOTS
Show the maximum amount of transaction.
Additional table information: table: tracking_share_transactions
SQL: SELECT MAX(amount_of_transaction) FROM TRANSACTIONS
Show all date and share count of transactions.
Additional table information: table: tracking_share_transactions
SQL: SELECT date_of_transaction, share_count FROM TRANSACTIONS
What is the total share of transactions?
Additional table information: table: tracking_share_transactions
SQL: SELECT SUM(share_count) FROM TRANSACTIONS
Show all transaction ids with transaction code 'PUR'.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'
Show all dates of transactions whose type code is 'SALE'.
Additional table information: table: tracking_share_transactions
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'
Show the average amount of transactions with type code 'SALE'.
Additional table information: table: tracking_share_transactions
SQL: SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'
Show the description of transaction type with code 'PUR'.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR'
Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50.
Additional table information: table: tracking_share_transactions
SQL: SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' AND share_count > 50
Show the maximum share count of transactions where the amount is smaller than 10000
Additional table information: table: tracking_share_transactions
SQL: SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000
Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.
Additional table information: table: tracking_share_transactions
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000
Show the transaction type descriptions and dates if the share count is smaller than 10.
Additional table information: table: tracking_share_transactions
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
Show details of all investors if they make any transaction with share count greater than 100.
Additional table information: table: tracking_share_transactions
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
How many distinct transaction types are used in the transactions?
Additional table information: table: tracking_share_transactions
SQL: SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS
Return the lot details and investor ids.
Additional table information: table: tracking_share_transactions
SQL: SELECT lot_details, investor_id FROM LOTS
Return the lot details of lots that belong to investors with details 'l'?
Additional table information: table: tracking_share_transactions
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'
What are the purchase details of transactions with amount bigger than 10000?
Additional table information: table: tracking_share_transactions
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
What are the sale details and dates of transactions with amount smaller than 3000?
Additional table information: table: tracking_share_transactions
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
What are the lot details of lots associated with transactions with share count smaller than 50?
Additional table information: table: tracking_share_transactions
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
What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is 'PUR'?
Additional table information: table: tracking_share_transactions
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'
Show the average transaction amount for different transaction types.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code
Show the maximum and minimum share count of different transaction types.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code
Show the average share count of transactions for different investors.
Additional table information: table: tracking_share_transactions
SQL: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id
Show the average share count of transactions each each investor, ordered by average share count.
Additional table information: table: tracking_share_transactions
SQL: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) NULLS FIRST
Show the average amount of transactions for different investors.
Additional table information: table: tracking_share_transactions
SQL: SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id
Show the average amount of transactions for different lots.
Additional table information: table: tracking_share_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
Show the average amount of transactions for different lots, ordered by average amount of transactions.
Additional table information: table: tracking_share_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) NULLS FIRST
Show the number of transactions with transaction type code 'SALE' for different investors if it is larger than 0.
Additional table information: table: tracking_share_transactions
SQL: SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id
Show the number of transactions for different investors.
Additional table information: table: tracking_share_transactions
SQL: SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id
Show the transaction type code that occurs the fewest times.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
Show the transaction type code that occurs the most frequently.
Additional table information: table: tracking_share_transactions
SQL: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
Show the description of the transaction type that occurs most frequently.
Additional table information: table: tracking_share_transactions
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
Show the id and details of the investor that has the largest number of transactions.
Additional table information: table: tracking_share_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
Show the id and details for the investors who have the top 3 number of transactions.
Additional table information: table: tracking_share_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
Show the ids of the investors who have at least two transactions.
Additional table information: table: tracking_share_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
Show the ids and details of the investors who have at least two transactions with type code 'SALE'.
Additional table information: table: tracking_share_transactions
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
What are the dates of transactions with at least 100 share count or amount bigger than 100?
Additional table information: table: tracking_share_transactions
SQL: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100
What are the details of all sales and purchases?
Additional table information: table: tracking_share_transactions
SQL: SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases
What are the details of the lots which are not used in any transactions?
Additional table information: table: tracking_share_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
How many available hotels are there in total?
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(*) FROM HOTELS
Find the total number of available hotels.
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(*) FROM HOTELS
What are the price ranges of hotels?
Additional table information: table: cre_Theme_park
SQL: SELECT price_range FROM HOTELS
Tell me the price ranges for all the hotels.
Additional table information: table: cre_Theme_park
SQL: SELECT price_range FROM HOTELS
Show all distinct location names.
Additional table information: table: cre_Theme_park
SQL: SELECT DISTINCT Location_Name FROM LOCATIONS
What are the distinct location names?
Additional table information: table: cre_Theme_park
SQL: SELECT DISTINCT Location_Name FROM LOCATIONS
Show the names and details of all the staff members.
Additional table information: table: cre_Theme_park
SQL: SELECT Name, Other_Details FROM Staff
What is the name and detail of each staff member?
Additional table information: table: cre_Theme_park
SQL: SELECT Name, Other_Details FROM Staff
Show details of all visitors.
Additional table information: table: cre_Theme_park
SQL: SELECT Tourist_Details FROM VISITORS
What is the detail of each visitor?
Additional table information: table: cre_Theme_park
SQL: SELECT Tourist_Details FROM VISITORS
Show the price ranges of hotels with 5 star ratings.
Additional table information: table: cre_Theme_park
SQL: SELECT price_range FROM HOTELS WHERE star_rating_code = '5'
What are the price ranges of five star hotels?
Additional table information: table: cre_Theme_park
SQL: SELECT price_range FROM HOTELS WHERE star_rating_code = '5'
Show the average price range of hotels that have 5 star ratings and allow pets.
Additional table information: table: cre_Theme_park
SQL: SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1
What is the average price range of five star hotels that allow pets?
Additional table information: table: cre_Theme_park
SQL: SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1
What is the address of the location 'UK Gallery'?
Additional table information: table: cre_Theme_park
SQL: SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'
Find the address of the location named 'UK Gallery'.
Additional table information: table: cre_Theme_park
SQL: SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'
What is the detail of the location UK Gallery?
Additional table information: table: cre_Theme_park
SQL: SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'
Return the detail of the location named 'UK Gallery'.
Additional table information: table: cre_Theme_park
SQL: SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'
Which location names contain the word 'film'?
Additional table information: table: cre_Theme_park
SQL: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'
Find all the locations whose names contain the word 'film'.
Additional table information: table: cre_Theme_park
SQL: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'
How many distinct names are associated with all the photos?
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(DISTINCT Name) FROM PHOTOS
Count the number of distinct names associated with the photos.
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(DISTINCT Name) FROM PHOTOS
What are the distinct visit dates?
Additional table information: table: cre_Theme_park
SQL: SELECT DISTINCT Visit_Date FROM VISITS
Find all the distinct visit dates.
Additional table information: table: cre_Theme_park
SQL: SELECT DISTINCT Visit_Date FROM VISITS
What are the names of the tourist attractions that can be accessed by bus?
Additional table information: table: cre_Theme_park
SQL: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'
Which tourist attractions can we get to by bus? Tell me the names of the attractions.
Additional table information: table: cre_Theme_park
SQL: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'
What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?
Additional table information: table: cre_Theme_park
SQL: SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'
Find the names and opening hours of the tourist attractions that we get to by bus or walk.
Additional table information: table: cre_Theme_park
SQL: SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'
What are the star rating descriptions of the hotels with price above 10000?
Additional table information: table: cre_Theme_park
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
Give me the star rating descriptions of the hotels that cost more than 10000.
Additional table information: table: cre_Theme_park
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
What are the details and opening hours of the museums?
Additional table information: table: cre_Theme_park
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
Give me the detail and opening hour for each museum.
Additional table information: table: cre_Theme_park
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
What is the name of the tourist attraction that is associated with the photo 'game1'?
Additional table information: table: cre_Theme_park
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'
Which tourist attraction is associated with the photo 'game1'? Return its name.
Additional table information: table: cre_Theme_park
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'
What are the names and descriptions of the photos taken at the tourist attraction 'film festival'?
Additional table information: table: cre_Theme_park
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'
Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'.
Additional table information: table: cre_Theme_park
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'
What are the details and ways to get to tourist attractions related to royal family?
Additional table information: table: cre_Theme_park
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
Which tourist attractions are related to royal family? Tell me their details and how we can get there.
Additional table information: table: cre_Theme_park
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
What are the details of the shops that can be accessed by walk?
Additional table information: table: cre_Theme_park
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'
Find the details of the shops that can be reached by walk.
Additional table information: table: cre_Theme_park
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'
What is the name of the staff that is in charge of the attraction named 'US museum'?
Additional table information: table: cre_Theme_park
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'
Tell me the name of the staff in charge of the attraction called 'US museum'.
Additional table information: table: cre_Theme_park
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'
What are the details of the markets that can be accessed by walk or bus?
Additional table information: table: cre_Theme_park
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'
Find the details of all the markets that are accessible by walk or bus.
Additional table information: table: cre_Theme_park
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'
What are the visit date and details of the visitor whose detail is 'Vincent'?
Additional table information: table: cre_Theme_park
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'
Find the visit date and details of the tourist whose detail is 'Vincent'
Additional table information: table: cre_Theme_park
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'
Which tourist attractions does the visitor with detail 'Vincent' visit?
Additional table information: table: cre_Theme_park
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'
Show the tourist attractions visited by the tourist whose detail is 'Vincent'.
Additional table information: table: cre_Theme_park
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'
What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'
For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'
Show the average price of hotels for each star rating code.
Additional table information: table: cre_Theme_park
SQL: SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code
What is the average price range of hotels for each each star rating code?
Additional table information: table: cre_Theme_park
SQL: SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code
Show the average price of hotels for different pet policy.
Additional table information: table: cre_Theme_park
SQL: SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn
What are the average prices of hotels grouped by their pet policy.
Additional table information: table: cre_Theme_park
SQL: SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn
Show the id and star rating of each hotel, ordered by its price from low to high.
Additional table information: table: cre_Theme_park
SQL: SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST
Find the id and star rating of each hotel and sort them in increasing order of price.
Additional table information: table: cre_Theme_park
SQL: SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST
Show the details of the top 3 most expensive hotels.
Additional table information: table: cre_Theme_park
SQL: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
What are the details of the three most expensive hotels?
Additional table information: table: cre_Theme_park
SQL: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
Show the details and star ratings of the 3 least expensive hotels.
Additional table information: table: cre_Theme_park
SQL: SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3
What are the details and star ratings of the three hotels with the lowest price ranges?
Additional table information: table: cre_Theme_park
SQL: SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3
Show the transportation method most people choose to get to tourist attractions.
Additional table information: table: cre_Theme_park
SQL: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
Which transportation method is used the most often to get to tourist attractions?
Additional table information: table: cre_Theme_park
SQL: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
Show the description and code of the attraction type most tourist attractions belong to.
Additional table information: table: cre_Theme_park
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
Which attraction type does the most tourist attractions belong to? Tell me its  attraction type description and code.
Additional table information: table: cre_Theme_park
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
Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.
Additional table information: table: cre_Theme_park
SQL: SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.
Additional table information: table: cre_Theme_park
SQL: SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
Show different tourist attractions' names, ids, and the corresponding number of visits.
Additional table information: table: cre_Theme_park
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
What are the name, id and the corresponding number of visits for each  tourist attraction?
Additional table information: table: cre_Theme_park
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
Show the names and ids of tourist attractions that are visited at least two times.
Additional table information: table: cre_Theme_park
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
Which tourist attractions are visited at least twice? Give me their names and ids.
Additional table information: table: cre_Theme_park
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
Show the names and ids of tourist attractions that are visited at most once.
Additional table information: table: cre_Theme_park
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
What are the names and ids of the tourist attractions that are visited at most once?
Additional table information: table: cre_Theme_park
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
What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
Additional table information: table: cre_Theme_park
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'
Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.
Additional table information: table: cre_Theme_park
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'
What are the names of the tourist attractions that have parking or shopping as their feature details?
Additional table information: table: cre_Theme_park
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'
Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?
Additional table information: table: cre_Theme_park
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'
What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?
Additional table information: table: cre_Theme_park
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'
Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.
Additional table information: table: cre_Theme_park
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'
What are the names of the tourist attractions Vincent and Marcelle visit?
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'
Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'
What are the names of tourist attraction that Alison visited but Rosalind did not visit?
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'
Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.
Additional table information: table: cre_Theme_park
SQL: SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'
How many tourists did not make any visit?
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)
Count the number of tourists who did not visit any place.
Additional table information: table: cre_Theme_park
SQL: SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)
How many video games exist?
Additional table information: table: game_1
SQL: SELECT COUNT(*) FROM Video_games
How many video games do you have?
Additional table information: table: game_1
SQL: SELECT COUNT(*) FROM Video_games
How many video game types exist?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT gtype) FROM Video_games
What is the count of different game types?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT gtype) FROM Video_games
Show all video game types.
Additional table information: table: game_1
SQL: SELECT DISTINCT gtype FROM Video_games
What are the different types of video games?
Additional table information: table: game_1
SQL: SELECT DISTINCT gtype FROM Video_games
Show all video games and their types in the order of their names.
Additional table information: table: game_1
SQL: SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST
What are the names of all the video games and their types in alphabetical order?
Additional table information: table: game_1
SQL: SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST
Show all video games with type Collectible card game.
Additional table information: table: game_1
SQL: SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'
What are the names of all video games that are collectible cards?
Additional table information: table: game_1
SQL: SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'
What is the type of video game Call of Destiny.
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'
What type of game is Call of Destiny?
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'
How many video games have type Massively multiplayer online game?
Additional table information: table: game_1
SQL: SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'
Count the number of video games with Massively multiplayer online game type .
Additional table information: table: game_1
SQL: SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'
Show all video game types and the number of video games in each type.
Additional table information: table: game_1
SQL: SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype
What are the types of video games and how many are in each type?
Additional table information: table: game_1
SQL: SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype
Which game type has most number of games?
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1
What type has the most games?
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1
Which game type has least number of games?
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1
What is the type with the fewest games?
Additional table information: table: game_1
SQL: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1
Show ids for all students who live in CHI.
Additional table information: table: game_1
SQL: SELECT StuID FROM Student WHERE city_code = 'CHI'
What are the ids of all students who live in CHI?
Additional table information: table: game_1
SQL: SELECT StuID FROM Student WHERE city_code = 'CHI'
Show ids for all students who have advisor 1121.
Additional table information: table: game_1
SQL: SELECT StuID FROM Student WHERE Advisor = 1121
What are the ids of all students who have advisor number 1121?
Additional table information: table: game_1
SQL: SELECT StuID FROM Student WHERE Advisor = 1121
Show first name for all students with major 600.
Additional table information: table: game_1
SQL: SELECT Fname FROM Student WHERE Major = 600
What are the first names for all students who are from the major numbered 600?
Additional table information: table: game_1
SQL: SELECT Fname FROM Student WHERE Major = 600
Show the average, minimum, and maximum age for different majors.
Additional table information: table: game_1
SQL: SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major
What are the average, minimum, and max ages for each of the different majors?
Additional table information: table: game_1
SQL: SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major
Show all advisors who have at least two students.
Additional table information: table: game_1
SQL: SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2
What are the advisors
Additional table information: table: game_1
SQL: SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2
How many sports do we have?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT sportname) FROM Sportsinfo
How many different types of sports do we offer?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT sportname) FROM Sportsinfo
How many students play sports?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT StuID) FROM Sportsinfo
How many different students are involved in sports?
Additional table information: table: game_1
SQL: SELECT COUNT(DISTINCT StuID) FROM Sportsinfo
List ids for all student who are on scholarship.
Additional table information: table: game_1
SQL: SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'
What are the ids for all sporty students who are on scholarship?
Additional table information: table: game_1
SQL: SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'
Show last names for all student who are on scholarship.
Additional table information: table: game_1
SQL: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'
What are the last names for all scholarship students?
Additional table information: table: game_1
SQL: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'
How many games are played for all students?
Additional table information: table: game_1
SQL: SELECT SUM(gamesplayed) FROM Sportsinfo
What is the total number of games played?
Additional table information: table: game_1
SQL: SELECT SUM(gamesplayed) FROM Sportsinfo
How many games are played for all football games by students on scholarship?
Additional table information: table: game_1
SQL: SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'
What is the total number of all football games played by scholarship students?
Additional table information: table: game_1
SQL: SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'
Show all sport name and the number of students.
Additional table information: table: game_1
SQL: SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname
How many students play each sport?
Additional table information: table: game_1
SQL: SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname
Show all student IDs with the number of sports and total number of games played
Additional table information: table: game_1
SQL: SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID
What are the ids of all students along with how many sports and games did they play?
Additional table information: table: game_1
SQL: SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID
Show all student IDs with more than total 10 hours per week on all sports played.
Additional table information: table: game_1
SQL: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10
What are the student IDs for everybody who worked for more than 10 hours per week on all sports?
Additional table information: table: game_1
SQL: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10