query_id
int64 0
7k
| database_id
stringclasses 140
values | table_id
listlengths 1
5
| query
stringlengths 16
224
| answer
stringlengths 18
577
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
5,900 |
cre_Theme_park
|
[
"locations"
] |
Which location names contain the word "film"?
|
SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"
|
medium
|
5,901 |
cre_Theme_park
|
[
"locations"
] |
Find all the locations whose names contain the word "film".
|
SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"
|
medium
|
5,902 |
cre_Theme_park
|
[
"photos"
] |
How many distinct names are associated with all the photos?
|
SELECT count(DISTINCT Name) FROM PHOTOS
|
easy
|
5,903 |
cre_Theme_park
|
[
"photos"
] |
Count the number of distinct names associated with the photos.
|
SELECT count(DISTINCT Name) FROM PHOTOS
|
easy
|
5,904 |
cre_Theme_park
|
[
"visits"
] |
What are the distinct visit dates?
|
SELECT DISTINCT Visit_Date FROM VISITS
|
easy
|
5,905 |
cre_Theme_park
|
[
"visits"
] |
Find all the distinct visit dates.
|
SELECT DISTINCT Visit_Date FROM VISITS
|
easy
|
5,906 |
cre_Theme_park
|
[
"tourist_attractions"
] |
What are the names of the tourist attractions that can be accessed by bus?
|
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus"
|
easy
|
5,907 |
cre_Theme_park
|
[
"tourist_attractions"
] |
Which tourist attractions can we get to by bus? Tell me the names of the attractions.
|
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus"
|
easy
|
5,908 |
cre_Theme_park
|
[
"tourist_attractions"
] |
What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?
|
SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk"
|
extra
|
5,909 |
cre_Theme_park
|
[
"tourist_attractions"
] |
Find the names and opening hours of the tourist attractions that we get to by bus or walk.
|
SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk"
|
extra
|
5,910 |
cre_Theme_park
|
[
"hotels",
"ref_hotel_star_ratings"
] |
What are the star rating descriptions of the hotels with price above 10000?
|
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
|
medium
|
5,911 |
cre_Theme_park
|
[
"hotels",
"ref_hotel_star_ratings"
] |
Give me the star rating descriptions of the hotels that cost more than 10000.
|
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
|
medium
|
5,912 |
cre_Theme_park
|
[
"tourist_attractions",
"museums"
] |
What are the details and opening hours of the museums?
|
SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID
|
medium
|
5,913 |
cre_Theme_park
|
[
"tourist_attractions",
"museums"
] |
Give me the detail and opening hour for each museum.
|
SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID
|
medium
|
5,914 |
cre_Theme_park
|
[
"tourist_attractions",
"photos"
] |
What is the name of the tourist attraction that is associated with the photo "game1"?
|
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"
|
medium
|
5,915 |
cre_Theme_park
|
[
"tourist_attractions",
"photos"
] |
Which tourist attraction is associated with the photo "game1"? Return its name.
|
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"
|
medium
|
5,916 |
cre_Theme_park
|
[
"tourist_attractions",
"photos"
] |
What are the names and descriptions of the photos taken at the tourist attraction "film festival"?
|
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"
|
medium
|
5,917 |
cre_Theme_park
|
[
"tourist_attractions",
"photos"
] |
Find the names and descriptions of the photos taken at the tourist attraction called "film festival".
|
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"
|
medium
|
5,918 |
cre_Theme_park
|
[
"tourist_attractions",
"royal_family"
] |
What are the details and ways to get to tourist attractions related to royal family?
|
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
|
medium
|
5,919 |
cre_Theme_park
|
[
"tourist_attractions",
"royal_family"
] |
Which tourist attractions are related to royal family? Tell me their details and how we can get there.
|
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
|
medium
|
5,920 |
cre_Theme_park
|
[
"tourist_attractions",
"shops"
] |
What are the details of the shops that can be accessed by walk?
|
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"
|
medium
|
5,921 |
cre_Theme_park
|
[
"tourist_attractions",
"shops"
] |
Find the details of the shops that can be reached by walk.
|
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"
|
medium
|
5,922 |
cre_Theme_park
|
[
"tourist_attractions",
"staff"
] |
What is the name of the staff that is in charge of the attraction named "US museum"?
|
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"
|
medium
|
5,923 |
cre_Theme_park
|
[
"tourist_attractions",
"staff"
] |
Tell me the name of the staff in charge of the attraction called "US museum".
|
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"
|
medium
|
5,924 |
cre_Theme_park
|
[
"tourist_attractions",
"street_markets"
] |
What are the details of the markets that can be accessed by walk or bus?
|
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"
|
hard
|
5,925 |
cre_Theme_park
|
[
"tourist_attractions",
"street_markets"
] |
Find the details of all the markets that are accessible by walk or bus.
|
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"
|
hard
|
5,926 |
cre_Theme_park
|
[
"visits",
"visitors"
] |
What are the visit date and details of the visitor whose detail is 'Vincent'?
|
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"
|
medium
|
5,927 |
cre_Theme_park
|
[
"visits",
"visitors"
] |
Find the visit date and details of the tourist whose detail is 'Vincent'
|
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"
|
medium
|
5,928 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
Which tourist attractions does the visitor with detail 'Vincent' visit?
|
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"
|
hard
|
5,929 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
Show the tourist attractions visited by the tourist whose detail is 'Vincent'.
|
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"
|
hard
|
5,930 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?
|
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"
|
extra
|
5,931 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.
|
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"
|
extra
|
5,932 |
cre_Theme_park
|
[
"hotels"
] |
Show the average price of hotels for each star rating code.
|
SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code
|
medium
|
5,933 |
cre_Theme_park
|
[
"hotels"
] |
What is the average price range of hotels for each each star rating code?
|
SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code
|
medium
|
5,934 |
cre_Theme_park
|
[
"hotels"
] |
Show the average price of hotels for different pet policy.
|
SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn
|
medium
|
5,935 |
cre_Theme_park
|
[
"hotels"
] |
What are the average prices of hotels grouped by their pet policy.
|
SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn
|
medium
|
5,936 |
cre_Theme_park
|
[
"hotels"
] |
Show the id and star rating of each hotel, ordered by its price from low to high.
|
SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC
|
medium
|
5,937 |
cre_Theme_park
|
[
"hotels"
] |
Find the id and star rating of each hotel and sort them in increasing order of price.
|
SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC
|
medium
|
5,938 |
cre_Theme_park
|
[
"hotels"
] |
Show the details of the top 3 most expensive hotels.
|
SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
|
medium
|
5,939 |
cre_Theme_park
|
[
"hotels"
] |
What are the details of the three most expensive hotels?
|
SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
|
medium
|
5,940 |
cre_Theme_park
|
[
"hotels"
] |
Show the details and star ratings of the 3 least expensive hotels.
|
SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3
|
medium
|
5,941 |
cre_Theme_park
|
[
"hotels"
] |
What are the details and star ratings of the three hotels with the lowest price ranges?
|
SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3
|
medium
|
5,942 |
cre_Theme_park
|
[
"tourist_attractions"
] |
Show the transportation method most people choose to get to tourist attractions.
|
SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
|
hard
|
5,943 |
cre_Theme_park
|
[
"tourist_attractions"
] |
Which transportation method is used the most often to get to tourist attractions?
|
SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1
|
hard
|
5,944 |
cre_Theme_park
|
[
"tourist_attractions",
"ref_attraction_types"
] |
Show the description and code of the attraction type most tourist attractions belong to.
|
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
|
extra
|
5,945 |
cre_Theme_park
|
[
"tourist_attractions",
"ref_attraction_types"
] |
Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.
|
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
|
extra
|
5,946 |
cre_Theme_park
|
[
"tourist_attractions"
] |
Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.
|
SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
|
medium
|
5,947 |
cre_Theme_park
|
[
"tourist_attractions"
] |
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.
|
SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
|
medium
|
5,948 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
Show different tourist attractions' names, ids, and the corresponding number of visits.
|
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
|
medium
|
5,949 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
What are the name, id and the corresponding number of visits for each tourist attraction?
|
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
|
medium
|
5,950 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
Show the names and ids of tourist attractions that are visited at least two times.
|
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
|
medium
|
5,951 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
Which tourist attractions are visited at least twice? Give me their names and ids.
|
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
|
medium
|
5,952 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
Show the names and ids of tourist attractions that are visited at most once.
|
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
|
medium
|
5,953 |
cre_Theme_park
|
[
"tourist_attractions",
"visits"
] |
What are the names and ids of the tourist attractions that are visited at most once?
|
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
|
medium
|
5,954 |
cre_Theme_park
|
[
"locations",
"tourist_attractions"
] |
What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
|
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"
|
hard
|
5,955 |
cre_Theme_park
|
[
"locations",
"tourist_attractions"
] |
Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.
|
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"
|
hard
|
5,956 |
cre_Theme_park
|
[
"tourist_attraction_features",
"tourist_attractions",
"features"
] |
What are the names of the tourist attractions that have parking or shopping as their feature details?
|
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'
|
extra
|
5,957 |
cre_Theme_park
|
[
"tourist_attraction_features",
"tourist_attractions",
"features"
] |
Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?
|
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'
|
extra
|
5,958 |
cre_Theme_park
|
[
"locations",
"tourist_attractions"
] |
What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?
|
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"
|
hard
|
5,959 |
cre_Theme_park
|
[
"locations",
"tourist_attractions"
] |
Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.
|
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"
|
hard
|
5,960 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
What are the names of the tourist attractions Vincent and Marcelle visit?
|
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Marcelle"
|
extra
|
5,961 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.
|
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Marcelle"
|
extra
|
5,962 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
What are the names of tourist attraction that Alison visited but Rosalind did not visit?
|
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind"
|
extra
|
5,963 |
cre_Theme_park
|
[
"tourist_attractions",
"visits",
"visitors"
] |
Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.
|
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind"
|
extra
|
5,964 |
cre_Theme_park
|
[
"visitors",
"visits"
] |
How many tourists did not make any visit?
|
SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
|
extra
|
5,965 |
cre_Theme_park
|
[
"visitors",
"visits"
] |
Count the number of tourists who did not visit any place.
|
SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )
|
extra
|
5,966 |
game_1
|
[
"video_games"
] |
How many video games exist?
|
SELECT count(*) FROM Video_games
|
easy
|
5,967 |
game_1
|
[
"video_games"
] |
How many video games do you have?
|
SELECT count(*) FROM Video_games
|
easy
|
5,968 |
game_1
|
[
"video_games"
] |
How many video game types exist?
|
SELECT count(DISTINCT gtype) FROM Video_games
|
easy
|
5,969 |
game_1
|
[
"video_games"
] |
What is the count of different game types?
|
SELECT count(DISTINCT gtype) FROM Video_games
|
easy
|
5,970 |
game_1
|
[
"video_games"
] |
Show all video game types.
|
SELECT DISTINCT gtype FROM Video_games
|
easy
|
5,971 |
game_1
|
[
"video_games"
] |
What are the different types of video games?
|
SELECT DISTINCT gtype FROM Video_games
|
easy
|
5,972 |
game_1
|
[
"video_games"
] |
Show all video games and their types in the order of their names.
|
SELECT gname , gtype FROM Video_games ORDER BY gname
|
medium
|
5,973 |
game_1
|
[
"video_games"
] |
What are the names of all the video games and their types in alphabetical order?
|
SELECT gname , gtype FROM Video_games ORDER BY gname
|
medium
|
5,974 |
game_1
|
[
"video_games"
] |
Show all video games with type Collectible card game.
|
SELECT gname FROM Video_games WHERE gtype = "Collectible card game"
|
easy
|
5,975 |
game_1
|
[
"video_games"
] |
What are the names of all video games that are collectible cards?
|
SELECT gname FROM Video_games WHERE gtype = "Collectible card game"
|
easy
|
5,976 |
game_1
|
[
"video_games"
] |
What is the type of video game Call of Destiny.
|
SELECT gtype FROM Video_games WHERE gname = "Call of Destiny"
|
easy
|
5,977 |
game_1
|
[
"video_games"
] |
What type of game is Call of Destiny?
|
SELECT gtype FROM Video_games WHERE gname = "Call of Destiny"
|
easy
|
5,978 |
game_1
|
[
"video_games"
] |
How many video games have type Massively multiplayer online game?
|
SELECT count(*) FROM Video_games WHERE gtype = "Massively multiplayer online game"
|
easy
|
5,979 |
game_1
|
[
"video_games"
] |
Count the number of video games with Massively multiplayer online game type .
|
SELECT count(*) FROM Video_games WHERE gtype = "Massively multiplayer online game"
|
easy
|
5,980 |
game_1
|
[
"video_games"
] |
Show all video game types and the number of video games in each type.
|
SELECT gtype , count(*) FROM Video_games GROUP BY gtype
|
medium
|
5,981 |
game_1
|
[
"video_games"
] |
What are the types of video games and how many are in each type?
|
SELECT gtype , count(*) FROM Video_games GROUP BY gtype
|
medium
|
5,982 |
game_1
|
[
"video_games"
] |
Which game type has most number of games?
|
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
|
hard
|
5,983 |
game_1
|
[
"video_games"
] |
What type has the most games?
|
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
|
hard
|
5,984 |
game_1
|
[
"video_games"
] |
Which game type has least number of games?
|
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
|
hard
|
5,985 |
game_1
|
[
"video_games"
] |
What is the type with the fewest games?
|
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
|
hard
|
5,986 |
game_1
|
[
"student"
] |
Show ids for all students who live in CHI.
|
SELECT StuID FROM Student WHERE city_code = "CHI"
|
easy
|
5,987 |
game_1
|
[
"student"
] |
What are the ids of all students who live in CHI?
|
SELECT StuID FROM Student WHERE city_code = "CHI"
|
easy
|
5,988 |
game_1
|
[
"student"
] |
Show ids for all students who have advisor 1121.
|
SELECT StuID FROM Student WHERE Advisor = 1121
|
easy
|
5,989 |
game_1
|
[
"student"
] |
What are the ids of all students who have advisor number 1121?
|
SELECT StuID FROM Student WHERE Advisor = 1121
|
easy
|
5,990 |
game_1
|
[
"student"
] |
Show first name for all students with major 600.
|
SELECT Fname FROM Student WHERE Major = 600
|
easy
|
5,991 |
game_1
|
[
"student"
] |
What are the first names for all students who are from the major numbered 600?
|
SELECT Fname FROM Student WHERE Major = 600
|
easy
|
5,992 |
game_1
|
[
"student"
] |
Show the average, minimum, and maximum age for different majors.
|
SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major
|
medium
|
5,993 |
game_1
|
[
"student"
] |
What are the average, minimum, and max ages for each of the different majors?
|
SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major
|
medium
|
5,994 |
game_1
|
[
"student"
] |
Show all advisors who have at least two students.
|
SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2
|
easy
|
5,995 |
game_1
|
[
"student"
] |
What are the advisors
|
SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2
|
easy
|
5,996 |
game_1
|
[
"sportsinfo"
] |
How many sports do we have?
|
SELECT count(DISTINCT sportname) FROM Sportsinfo
|
easy
|
5,997 |
game_1
|
[
"sportsinfo"
] |
How many different types of sports do we offer?
|
SELECT count(DISTINCT sportname) FROM Sportsinfo
|
easy
|
5,998 |
game_1
|
[
"sportsinfo"
] |
How many students play sports?
|
SELECT count(DISTINCT StuID) FROM Sportsinfo
|
easy
|
5,999 |
game_1
|
[
"sportsinfo"
] |
How many different students are involved in sports?
|
SELECT count(DISTINCT StuID) FROM Sportsinfo
|
easy
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.