db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
cre_Theme_park | select address from locations where location_name = 'uk gallery' | Question: find the address of the location named 'uk gallery'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Detail... | find the address of the location named 'uk gallery'. |
cre_Theme_park | select other_details from locations where location_name = 'uk gallery' | Question: what is the detail of the location uk gallery? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Details. Fea... | what is the detail of the location uk gallery? |
cre_Theme_park | select other_details from locations where location_name = 'uk gallery' | Question: return the detail of the location named 'uk gallery'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Detai... | return the detail of the location named 'uk gallery'. |
cre_Theme_park | select location_name from locations where location_name like '%film%' | Question: which location names contain the word 'film'? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Details. Feat... | which location names contain the word 'film'? |
cre_Theme_park | select location_name from locations where location_name like '%film%' | Question: find all the locations whose names contain the word 'film'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist... | find all the locations whose names contain the word 'film'. |
cre_Theme_park | select count(distinct name) from photos | Question: how many distinct names are associated with all the photos? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist... | how many distinct names are associated with all the photos? |
cre_Theme_park | select count(distinct name) from photos | Question: count the number of distinct names associated with the photos. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tour... | count the number of distinct names associated with the photos. |
cre_Theme_park | select distinct visit_date from visits | Question: what are the distinct visit dates? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Details. Features -> Fea... | what are the distinct visit dates? |
cre_Theme_park | select distinct visit_date from visits | Question: find all the distinct visit dates. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Details. Features -> Fea... | find all the distinct visit dates. |
cre_Theme_park | select name from tourist_attractions where how_to_get_there = 'bus' | Question: what are the names of the tourist attractions that can be accessed by bus? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tour... | what are the names of the tourist attractions that can be accessed by bus? |
cre_Theme_park | select name from tourist_attractions where how_to_get_there = 'bus' | Question: which tourist attractions can we get to by bus? tell me the names of the attractions. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visit... | which tourist attractions can we get to by bus? tell me the names of the attractions. |
cre_Theme_park | select name , opening_hours from tourist_attractions where how_to_get_there = 'bus' or how_to_get_there = 'walk' | Question: what are the names and opening hours of the tourist attractions that can be accessed by bus or walk? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Des... | what are the names and opening hours of the tourist attractions that can be accessed by bus or walk? |
cre_Theme_park | select name , opening_hours from tourist_attractions where how_to_get_there = 'bus' or how_to_get_there = 'walk' | Question: find the names and opening hours of the tourist attractions that we get to by bus or walk. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. ... | find the names and opening hours of the tourist attractions that we get to by bus or walk. |
cre_Theme_park | 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 | Question: what are the star rating descriptions of the hotels with price above 10000? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tou... | what are the star rating descriptions of the hotels with price above 10000? |
cre_Theme_park | 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 | Question: give me the star rating descriptions of the hotels that cost more than 10000. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> T... | give me the star rating descriptions of the hotels that cost more than 10000. |
cre_Theme_park | select t1.museum_details , t2.opening_hours from museums as t1 join tourist_attractions as t2 on t1.museum_id = t2.tourist_attraction_id | Question: what are the details and opening hours of the museums? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Deta... | what are the details and opening hours of the museums? |
cre_Theme_park | select t1.museum_details , t2.opening_hours from museums as t1 join tourist_attractions as t2 on t1.museum_id = t2.tourist_attraction_id | Question: give me the detail and opening hour for each museum. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Detail... | give me the detail and opening hour for each museum. |
cre_Theme_park | 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' | Question: what is the name of the tourist attraction that is associated with the photo 'game1'? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visit... | what is the name of the tourist attraction that is associated with the photo 'game1'? |
cre_Theme_park | 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' | Question: which tourist attraction is associated with the photo 'game1'? return its name. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors ->... | which tourist attraction is associated with the photo 'game1'? return its name. |
cre_Theme_park | 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' | Question: what are the names and descriptions of the photos taken at the tourist attraction 'film festival'? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Descr... | what are the names and descriptions of the photos taken at the tourist attraction 'film festival'? |
cre_Theme_park | 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' | Question: find the names and descriptions of the photos taken at the tourist attraction called 'film festival'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_De... | find the names and descriptions of the photos taken at the tourist attraction called 'film festival'. |
cre_Theme_park | 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 | Question: what are the details and ways to get to tourist attractions related to royal family? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visito... | what are the details and ways to get to tourist attractions related to royal family? |
cre_Theme_park | 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 | Question: which tourist attractions are related to royal family? tell me their details and how we can get there. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_D... | which tourist attractions are related to royal family? tell me their details and how we can get there. |
cre_Theme_park | 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' | Question: what are the details of the shops that can be accessed by walk? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tou... | what are the details of the shops that can be accessed by walk? |
cre_Theme_park | 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' | Question: find the details of the shops that can be reached by walk. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_... | find the details of the shops that can be reached by walk. |
cre_Theme_park | 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' | Question: what is the name of the staff that is in charge of the attraction named 'us museum'? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visito... | what is the name of the staff that is in charge of the attraction named 'us museum'? |
cre_Theme_park | 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' | Question: tell me the name of the staff in charge of the attraction called 'us museum'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> T... | tell me the name of the staff in charge of the attraction called 'us museum'. |
cre_Theme_park | 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' | Question: what are the details of the markets that can be accessed by walk or bus? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Touris... | what are the details of the markets that can be accessed by walk or bus? |
cre_Theme_park | 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' | Question: find the details of all the markets that are accessible by walk or bus. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist... | find the details of all the markets that are accessible by walk or bus. |
cre_Theme_park | 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' | Question: what are the visit date and details of the visitor whose detail is 'vincent'? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> T... | what are the visit date and details of the visitor whose detail is 'vincent'? |
cre_Theme_park | 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' | Question: find the visit date and details of the tourist whose detail is 'vincent' | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Touris... | find the visit date and details of the tourist whose detail is 'vincent' |
cre_Theme_park | 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' | Question: which tourist attractions does the visitor with detail 'vincent' visit? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist... | which tourist attractions does the visitor with detail 'vincent' visit? |
cre_Theme_park | 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' | Question: show the tourist attractions visited by the tourist whose detail is 'vincent'. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> ... | show the tourist attractions visited by the tourist whose detail is 'vincent'. |
cre_Theme_park | 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' | Question: what are the names of the tourist attractions and the dates when the tourists named vincent or vivian visited there? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Att... | what are the names of the tourist attractions and the dates when the tourists named vincent or vivian visited there? |
cre_Theme_park | 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' | Question: for each tourist attraction, return its name and the date when the tourists named vincent or vivian visited there. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attra... | for each tourist attraction, return its name and the date when the tourists named vincent or vivian visited there. |
cre_Theme_park | select star_rating_code , avg(price_range) from hotels group by star_rating_code | Question: show the average price of hotels for each star rating code. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist... | show the average price of hotels for each star rating code. |
cre_Theme_park | select star_rating_code , avg(price_range) from hotels group by star_rating_code | Question: what is the average price range of hotels for each each star rating code? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Touri... | what is the average price range of hotels for each each star rating code? |
cre_Theme_park | select pets_allowed_yn , avg(price_range) from hotels group by pets_allowed_yn | Question: show the average price of hotels for different pet policy. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_... | show the average price of hotels for different pet policy. |
cre_Theme_park | select pets_allowed_yn , avg(price_range) from hotels group by pets_allowed_yn | Question: what are the average prices of hotels grouped by their pet policy. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, ... | what are the average prices of hotels grouped by their pet policy. |
cre_Theme_park | select hotel_id , star_rating_code from hotels order by price_range asc | Question: show the id and star rating of each hotel, ordered by its price from low to high. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors ... | show the id and star rating of each hotel, ordered by its price from low to high. |
cre_Theme_park | select hotel_id , star_rating_code from hotels order by price_range asc | Question: find the id and star rating of each hotel and sort them in increasing order of price. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visit... | find the id and star rating of each hotel and sort them in increasing order of price. |
cre_Theme_park | select other_hotel_details from hotels order by price_range desc limit 3 | Question: show the details of the top 3 most expensive hotels. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Detail... | show the details of the top 3 most expensive hotels. |
cre_Theme_park | select other_hotel_details from hotels order by price_range desc limit 3 | Question: what are the details of the three most expensive hotels? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_De... | what are the details of the three most expensive hotels? |
cre_Theme_park | select other_hotel_details , star_rating_code from hotels order by price_range asc limit 3 | Question: show the details and star ratings of the 3 least expensive hotels. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, ... | show the details and star ratings of the 3 least expensive hotels. |
cre_Theme_park | select other_hotel_details , star_rating_code from hotels order by price_range asc limit 3 | Question: what are the details and star ratings of the three hotels with the lowest price ranges? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Vis... | what are the details and star ratings of the three hotels with the lowest price ranges? |
cre_Theme_park | select how_to_get_there from tourist_attractions group by how_to_get_there order by count(*) desc limit 1 | Question: show the transportation method most people choose to get to tourist attractions. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -... | show the transportation method most people choose to get to tourist attractions. |
cre_Theme_park | select how_to_get_there from tourist_attractions group by how_to_get_there order by count(*) desc limit 1 | Question: which transportation method is used the most often to get to tourist attractions? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors ... | which transportation method is used the most often to get to tourist attractions? |
cre_Theme_park | 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 | Question: show the description and code of the attraction type most tourist attractions belong to. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Vi... | show the description and code of the attraction type most tourist attractions belong to. |
cre_Theme_park | 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 | Question: which attraction type does the most tourist attractions belong to? tell me its attraction type description and code. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, At... | which attraction type does the most tourist attractions belong to? tell me its attraction type description and code. |
cre_Theme_park | select how_to_get_there , count(*) from tourist_attractions group by how_to_get_there | Question: show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, A... | show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. |
cre_Theme_park | select how_to_get_there , count(*) from tourist_attractions group by how_to_get_there | Question: list all the possible ways to get to attractions, together with the number of attractions accessible by these methods. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, A... | list all the possible ways to get to attractions, together with the number of attractions accessible by these methods. |
cre_Theme_park | 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 | Question: show different tourist attractions' names, ids, and the corresponding number of visits. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Vis... | show different tourist attractions' names, ids, and the corresponding number of visits. |
cre_Theme_park | 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 | Question: what are the name, id and the corresponding number of visits for each tourist attraction? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. ... | what are the name, id and the corresponding number of visits for each tourist attraction? |
cre_Theme_park | 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 | Question: show the names and ids of tourist attractions that are visited at least two times. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors... | show the names and ids of tourist attractions that are visited at least two times. |
cre_Theme_park | 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 | Question: which tourist attractions are visited at least twice? give me their names and ids. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors... | which tourist attractions are visited at least twice? give me their names and ids. |
cre_Theme_park | 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 | Question: show the names and ids of tourist attractions that are visited at most once. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> To... | show the names and ids of tourist attractions that are visited at most once. |
cre_Theme_park | 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 | Question: what are the names and ids of the tourist attractions that are visited at most once? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visito... | what are the names and ids of the tourist attractions that are visited at most once? |
cre_Theme_park | 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' | Question: what are the names of tourist attractions that can be reached by walk or is at address 660 shea crescent? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Typ... | what are the names of tourist attractions that can be reached by walk or is at address 660 shea crescent? |
cre_Theme_park | 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' | Question: find the names of the tourist attractions that is either accessible by walk or at address 660 shea crescent. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_... | find the names of the tourist attractions that is either accessible by walk or at address 660 shea crescent. |
cre_Theme_park | 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... | Question: what are the names of the tourist attractions that have parking or shopping as their feature details? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_De... | what are the names of the tourist attractions that have parking or shopping as their feature details? |
cre_Theme_park | 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... | Question: find the tourist attractions that have parking or shopping as their feature details. what are the names of the attractions? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Co... | find the tourist attractions that have parking or shopping as their feature details. what are the names of the attractions? |
cre_Theme_park | 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' | Question: what are the names of tourist attractions that can be reached by bus or is at address 254 ottilie junction? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_T... | what are the names of tourist attractions that can be reached by bus or is at address 254 ottilie junction? |
cre_Theme_park | 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' | Question: find the names of the tourist attractions that is either accessible by bus or at address 254 ottilie junction. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attractio... | find the names of the tourist attractions that is either accessible by bus or at address 254 ottilie junction. |
cre_Theme_park | 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.tour... | Question: what are the names of the tourist attractions vincent and marcelle visit? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Touri... | what are the names of the tourist attractions vincent and marcelle visit? |
cre_Theme_park | 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.tour... | Question: which tourist attractions do the tourists vincent and marcelle visit? tell me the names of the attractions. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_T... | which tourist attractions do the tourists vincent and marcelle visit? tell me the names of the attractions. |
cre_Theme_park | 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_... | Question: what are the names of tourist attraction that alison visited but rosalind did not visit? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Vi... | what are the names of tourist attraction that alison visited but rosalind did not visit? |
cre_Theme_park | 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_... | Question: find the the names of the tourist attractions that the tourist named alison visited but rosalind did not visit. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attracti... | find the the names of the tourist attractions that the tourist named alison visited but rosalind did not visit. |
cre_Theme_park | select count(*) from visitors where tourist_id not in ( select tourist_id from visits ) | Question: how many tourists did not make any visit? | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_Details. Features... | how many tourists did not make any visit? |
cre_Theme_park | select count(*) from visitors where tourist_id not in ( select tourist_id from visits ) | Question: count the number of tourists who did not visit any place. | Tables: Ref_Hotel_Star_Ratings -> star_rating_code, star_rating_description. Locations -> Location_ID, Location_Name, Address, Other_Details. Ref_Attraction_Types -> Attraction_Type_Code, Attraction_Type_Description. Visitors -> Tourist_ID, Tourist_D... | count the number of tourists who did not visit any place. |
game_1 | select count(*) from video_games | Question: how many video games exist? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID, Play... | how many video games exist? |
game_1 | select count(*) from video_games | Question: how many video games do you have? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID... | how many video games do you have? |
game_1 | select count(distinct gtype) from video_games | Question: how many video game types exist? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID,... | how many video game types exist? |
game_1 | select count(distinct gtype) from video_games | Question: what is the count of different game types? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Stud... | what is the count of different game types? |
game_1 | select distinct gtype from video_games | Question: show all video game types. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID, Plays... | show all video game types. |
game_1 | select distinct gtype from video_games | Question: what are the different types of video games? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = St... | what are the different types of video games? |
game_1 | select gname , gtype from video_games order by gname | Question: show all video games and their types in the order of their names. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: P... | show all video games and their types in the order of their names. |
game_1 | select gname , gtype from video_games order by gname | Question: what are the names of all the video games and their types in alphabetical order? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholars... | what are the names of all the video games and their types in alphabetical order? |
game_1 | select gname from video_games where gtype = 'collectible card game' | Question: show all video games with type collectible card game. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.S... | show all video games with type collectible card game. |
game_1 | select gname from video_games where gtype = 'collectible card game' | Question: what are the names of all video games that are collectible cards? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: P... | what are the names of all video games that are collectible cards? |
game_1 | select gtype from video_games where gname = 'call of destiny' | Question: what is the type of video game call of destiny. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID =... | what is the type of video game call of destiny. |
game_1 | select gtype from video_games where gname = 'call of destiny' | Question: what type of game is call of destiny? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.S... | what type of game is call of destiny? |
game_1 | select count(*) from video_games where gtype = 'massively multiplayer online game' | Question: how many video games have type massively multiplayer online game? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: P... | how many video games have type massively multiplayer online game? |
game_1 | select count(*) from video_games where gtype = 'massively multiplayer online game' | Question: count the number of video games with massively multiplayer online game type . | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship... | count the number of video games with massively multiplayer online game type . |
game_1 | select gtype , count(*) from video_games group by gtype | Question: show all video game types and the number of video games in each type. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Join... | show all video game types and the number of video games in each type. |
game_1 | select gtype , count(*) from video_games group by gtype | Question: what are the types of video games and how many are in each type? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Pl... | what are the types of video games and how many are in each type? |
game_1 | select gtype from video_games group by gtype order by count(*) desc limit 1 | Question: which game type has most number of games? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Stude... | which game type has most number of games? |
game_1 | select gtype from video_games group by gtype order by count(*) desc limit 1 | Question: what type has the most games? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID, Pl... | what type has the most games? |
game_1 | select gtype from video_games group by gtype order by count(*) limit 1 | Question: which game type has least number of games? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Stud... | which game type has least number of games? |
game_1 | select gtype from video_games group by gtype order by count(*) limit 1 | Question: what is the type with the fewest games? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student... | what is the type with the fewest games? |
game_1 | select stuid from student where city_code = 'chi' | Question: show ids for all students who live in chi. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Stud... | show ids for all students who live in chi. |
game_1 | select stuid from student where city_code = 'chi' | Question: what are the ids of all students who live in chi? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID... | what are the ids of all students who live in chi? |
game_1 | select stuid from student where advisor = 1121 | Question: show ids for all students who have advisor 1121. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID ... | show ids for all students who have advisor 1121. |
game_1 | select stuid from student where advisor = 1121 | Question: what are the ids of all students who have advisor number 1121? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Play... | what are the ids of all students who have advisor number 1121? |
game_1 | select fname from student where major = 600 | Question: show first name for all students with major 600. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID ... | show first name for all students with major 600. |
game_1 | select fname from student where major = 600 | Question: what are the first names for all students who are from the major numbered 600? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarshi... | what are the first names for all students who are from the major numbered 600? |
game_1 | select major , avg(age) , min(age) , max(age) from student group by major | Question: show the average, minimum, and maximum age for different majors. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Pl... | show the average, minimum, and maximum age for different majors. |
game_1 | select major , avg(age) , min(age) , max(age) from student group by major | Question: what are the average, minimum, and max ages for each of the different majors? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship... | what are the average, minimum, and max ages for each of the different majors? |
game_1 | select advisor from student group by advisor having count(*) >= 2 | Question: show all advisors who have at least two students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID... | show all advisors who have at least two students. |
game_1 | select advisor from student group by advisor having count(*) >= 2 | Question: what are the advisors | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID, Plays_Game... | what are the advisors |
game_1 | select count(distinct sportname) from sportsinfo | Question: how many sports do we have? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Video_Games -> GameID, GName, GType. Plays_Games -> StuID, GameID, Hours_Played. SportsInfo -> StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship. | Joins: Plays_Games.StuID = Student.StuID, Play... | how many sports do we have? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.