db_id
stringclasses 69
values | question
stringlengths 24
325
| evidence
stringlengths 1
673
⌀ | SQL
stringlengths 23
804
| schema
stringclasses 69
values |
|---|---|---|---|---|
restaurant
|
Please list all of the restaurants that serve European food.
|
restaurant refers to label; European food refers to food_type = 'european'
|
SELECT label FROM generalinfo WHERE food_type = 'european'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What cities are located in Northern California?
|
Northern California refers to region = 'northern california'
|
SELECT city FROM geographic WHERE region = 'northern california'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What does the one and only 24-hour diner's name?
|
24-hour diner refers to food_type = '24 hour diner'; diner name refers to label
|
SELECT label FROM generalinfo WHERE food_type = '24 hour diner'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Please list any five cities that have an unidentified county and region.
|
unidentified county and region refers to county = 'unknown' AND region = 'unknown'
|
SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the county and region of Davis City?
| null |
SELECT county, region FROM geographic WHERE city = 'Davis'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Please list all of the street names in Clayton City.
| null |
SELECT street_name FROM location WHERE city = 'Clayton'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What are the most popular restaurants in San Francisco among diners?
|
the most popular refers to max(review); restaurant refers to label; San Francisco refers to city = 'San Francisco'
|
SELECT id_restaurant, label FROM generalinfo WHERE city = 'San Francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE city = 'San Francisco' )
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many American food restaurants are unpopular in Carmel?
|
American Food Restaurant refers to food_type = 'ameraican'; unpopular refers to min(review); Carmel refers to city = 'Carmel'
|
SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' )
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the percentage of restaurants that serve American food in Dublin city?
|
American food refers to food_type = 'american food'; percentage = divide(count(id_restaurant), count(id_restaurant where food_type = 'american food')) where city = 'dublin' * 100%
|
SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the full address of Albert's Café?
|
full address = street_num, street_name, city; Albert's Café refers to label = 'Albert's Café'
|
SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What are the restaurants that are located at "19th St. Oakland"?
|
restaurant refers to label; "19th St. Oakland" refers to street_name = '19th St' AND city = 'Oakland'
|
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'Oakland' AND T2.street_name = '19th St'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What kind of restaurants can be found at "106 E 25th Ave"?
|
kind of restaurant refers to food_type; "106 E 25th Ave" refers to street_name = 'e 25th ave'
|
SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Please name any three restaurants that have an unidentified region.
|
restaurant name refers to label; unidentified region refers to region = 'unknown'
|
SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T3.region = 'unknown' LIMIT 3
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the name of the Chinese restaurant that can be found at 104 San Tomas Aquino Road, Campbell?
|
restaurant name refers to label; Chinese restaurant refers to food_type = 'chinese'; 104 San Tomas Aquino Road Campbell refers to street_num = 104 AND street_name = 'san tomas aquino road' AND city = 'campbell'
|
SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 104 AND T1.city = 'campbell' AND T2.street_name = 'san tomas aquino road'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many Thai restaurants can be found in San Pablo Ave, Albany?
|
Thai restaurant refers to food_type = 'thai'; San Pablo Ave Albany refers to street_name = 'san pablo ave' AND T1.city = 'albany'
|
SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2.street_name = 'san pablo ave'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the county and region of Plearn-Thai Cuisine restaurant?
|
Plearn-Thai Cuisine restaurant refers to label = 'plearn-thai cuisine'
|
SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region?
|
restaurant name refers to label
|
SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which county and region does the street E. El Camino Real belong to?
|
street E. El Camino Real refers to street_name = 'E. El Camino Real'
|
SELECT DISTINCT T2.county, T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the name of the least popular Indian restaurant on Shattuck Avenue in Berkeley?
|
restaurant name refers to label; the least popular refers to min(review); Indian restaurant refers to food_type = 'Indian restaurant'; Shattuck Avenue in Berkeley refers to street_name = 'shattuck ave' and city = 'berkeley'
|
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the percentage of restaurants in the Bay Area region that scored over 4 for the review rating?
|
scored over 4 refers to review > 4; percentage = divide(count(id_restaurant where region = 'bay area' and review > 4), count(id_restaurant where region = 'Bay Area')) * 100%
|
SELECT CAST(SUM(IIF(T2.review > 4, 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 RIGHT JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List every city in San Mateo County.
| null |
SELECT city FROM geographic WHERE county = 'san mateo county'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many restaurants have more than 4 star reviews?
|
more than 4 star review refers to review > 4
|
SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which street has the most restaurants?
|
street refers to street_name; the most restaurants refers to max(count(street_name))
|
SELECT street_name FROM location GROUP BY street_name ORDER BY COUNT(street_name) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which chicken restaurant has the highest review?
|
chicken restaurant refers to food_type = 'chicken'; the highest review refers to max(review)
|
SELECT label FROM generalinfo WHERE food_type = 'chicken' ORDER BY review DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which county is El Cerrito from?
|
El Cerrito refers to city = 'el cerrito'
|
SELECT county FROM geographic WHERE city = 'el cerrito'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many restaurants are on Irving Street?
|
Irving Street refers to street_name = 'irving'
|
SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Provide a list of restaurants from Marin county.
|
restaurant refers to label
|
SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the address of the Peking Duck restaurant?
|
address refers to street_num, street_name; Peking Duck restaurant refers to label = 'peking duck restaurant'
|
SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List all the streets with more than 10 restaurants in Alameda county.
|
street refers to street_name; more than 10 restaurants refers to count(id_restaurant) > 10
|
SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What are the regions with Greek restaurants?
|
Greek restaurant refers to food_type = 'greek'
|
SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List all of the restaurant addresses from an unknown region.
|
restaurant address refers to street_num, street_name; unknown region refers to region = 'unknown'
|
SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the review of the restaurant at 8440 Murray Ave?
|
8440 Murray Ave refers to street_num = 8440 and street_name = 'murray ave'
|
SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What type of restaurant is most common in Monterey county?
|
type refers to food_type; most common refers to max(count(food_type))
|
SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'Monterey' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which street in San Francisco has the most burger restaurants?
|
street refers to street_name; San Francisco refers to city = 'san francisco'; burger restaurant refers to food_type = 'burgers'; the most burger restaurants refers to max(count(street_name where food_type = 'burgers' and city = 'san francisco'))
|
SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the region of 1149 El Camino Real?
|
1149 El Camino Real refers to street_num = 1149 and street_name = 'el camino real'
|
SELECT T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_num = 1149 AND T1.street_name = 'el camino real'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the county of the Sankee restaurant?
|
Sankee restaurant refers to label = 'sankee'
|
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'sankee'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many streets with restaurants are there in the Northern California region?
| null |
SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'northern california'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List all of the restaurants on Park St.
|
restaurant refers to label; Park St refers to street_name = 'park st'
|
SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What percentage of restaurants are from the Bay Area?
|
Bay Area refers to region = 'bay area'; percentage = divide(count(id_restaurant where region = 'bay area'), count(id_restaurant)) * 100%
|
SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List all the average reviews of Chinese restaurants for each county from highest to lowest.
|
Chinese restaurant refers to food_type = 'chinese'; average review refers to divide(sum(review), count(review))
|
SELECT AVG(T1.review) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'chinese' GROUP BY T1.id_restaurant ORDER BY AVG(T1.review) DESC
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List street names in San Francisco city.
| null |
SELECT street_name FROM location WHERE city = 'San Francisco'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List restaurant ids located in Danville city.
| null |
SELECT id_restaurant FROM location WHERE city = 'Danville'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many cities are located in the Bay Area?
|
the Bay Area refers to region = 'bay area'
|
SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many labels of the restaurant have an unknown country?
|
unknown county refers to county = 'unknown'
|
SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Please indicate the street names of restaurants with food type is American.
| null |
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Please indicate which labels have the city located in Santa Cruz.
|
Santa Cruz refers to county = 'Santa Cruz county'
|
SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'Santa Cruz county'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Give the review of the restaurant at 430, Broadway.
|
430 Broadway refers to street_num = 430 and street_name = 'Broadway'
|
SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Indicate the address of the restaurant with the most popular reviews.
|
address refers to street_num, street_name; the most popular review refers to max(review)
|
SELECT T2.street_num, T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which country has the most restaurants with Italian food?
|
Italian food refers to food_type = 'Italian'
|
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Find the percentage of restaurant in Napa Valley.
|
Napa Valley refers to region = 'Napa Valley'; percentage = divide(count(id_restaurant where region = 'Napa Valley'), count(id_restaurant)) * 100%
|
SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many of the cities are in a Bay Area?
|
Bay Area refers to region = 'bay area'
|
SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List down the cities with unknown country.
|
unknown county refers to county = 'unknown'
|
SELECT city FROM geographic WHERE county = 'unknown'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the city located in Bay Area of Santa Clara?
|
Bay Area refers to region = 'bay area'; Santa Clara refers to county = 'santa clara county'
|
SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List down the restaurant ID of restaurants located in Sunnyvale.
|
Sunnyvale refers to city = 'sunnyvale'
|
SELECT id_restaurant FROM location WHERE city = 'sunnyvale'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among the restaurants on street number below 1000, how many of them are in Railroad St.?
|
street number below 1000 refers to street_num < 1000; Railroad St. refers to street_name = 'railroad'
|
SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the name of the 24 hour diner at San Francisco?
|
name refers to label; 24 hour diner refers to food_type = '24 hour diner'; San Francisco refers to city = 'san francisco'
|
SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Give the review of the restaurant located in Ocean St., Santa Cruz.
|
Ocean St. refers to street_name = 'ocean st'; Santa Cruz refers to city = 'santa cruz'
|
SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'santa cruz' AND T1.street_name = 'ocean st'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Give the street number of a bar in Oakland with a 2.7 review.
|
street number refers to street_num; bar refers to food_type = 'bar'; Oakland refers to city = 'oakland'; 2.7 review refers to review = 2.7
|
SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among the bakeries, what is total number of bakery located at University Avenue, Palo Alto?
|
bakery refers to food_type = 'bakery'; University Avenue refers to street_name = 'university ave.'; Palo Alto refers to city = 'palo alto'
|
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among the listed winery, what is the street number of the winery named "Tulocay Winery"?
|
winery refers to food_type = 'winery'; street number refers to street_num; "Tulocay Winery" refers to label = 'Tulocay winery'
|
SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List the review and label of the restaurants in Mission Blvd., Hayward.
|
Mission Blvd. refers to street_name = 'mission blvd'; Hayward refers to city = 'hayward'
|
SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among all indian restaurants in Castro St., Mountainview, how many of them is about cookhouse in their label?
|
indian restaurant refers to food_type = 'indian'; Castro St. refers to street_name = 'castro st'; Mountainview refers to city = 'mountainview'; have the word "Indian" in label refers to label = 'indian'
|
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'castro st' AND T1.city = 'mountain view' AND T2.food_type = 'indian' AND T2.label LIKE '%cookhouse%'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
In restaurants with a review of 2, how many restaurants have a street number below 500?
|
review of 2 refers to review = 2; street number below 500 refers to street_num < 500
|
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among all asian restaurants in N. Milpitas Blvd., Milpitas, how many of them have restaurant ID greater than 385?
|
asian restaurant refers to food_type = 'asian'; N. Milpitas Blvd. refers to street_name = 'n milpitas blvd'; Milpitas refers to city = 'milpitas'; restaurant ID greater than 385 refers to id_restaurant > 385
|
SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the restaurant's name and ID located at Ocean Avenue, San Francisco?
|
restaurant's name refers to label; Ocean Avenue refers to street_name = 'ocean avenue'; San Francisco refers to city = 'san francisco'
|
SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the full address of the restaurant named "Sanuki Restaurant"?
|
full address refers to city, street_num, street_name; restaurant named "Sanuki Restaurant" refers to label = 'sanuki restaurant'
|
SELECT T2.city, T1.street_num, T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'sanuki restaurant'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List the food type of the restaurant located in 22779 6th St., Hayward City.
|
22779 refers to street_num = 22779; 6th St. refers to street_name = '6th St'
|
SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_num = 22779 AND T1.street_name = '6th St' AND T2.city = 'hayward'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many American restaurants are located in Front, San Francisco?
|
American restaurant refers to food_type = 'american'; Front refers to street_name = 'front'; San Francisco refers to city = 'san francisco'
|
SELECT COUNT(T2.food_type = 'american') FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'front'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.
|
American restaurant refers to food_type = 'american'; street number greater than 2000 refers to street_num > 2000; review greater than the 70% of average review refers to review > multiply(avg(review), 0.7)
|
SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?
|
street number ranges from 1000 to 2000 refers to 1000 < = street_num < = 2000; Afghani restaurant refers to food_type = 'afghani'; percentage = divide(count(id_restaurant where food_type = 'afghani'), count(id_restaurant)) * 100%
|
SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the name of the most popular restaurant serving Asian foods in San Francisco?
|
the most popular refers to max(review); Asian food refers to food_type = 'asian'; San Francisco refers to city = 'san francisco'
|
SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' )
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many cities are there in Monterey?
|
Monterey refers to region = 'monterey'
|
SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many deli in Belmont have a review rating of 2 or more?
|
deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2
|
SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which county in northern California has the highest number of cities?
|
northern California refers to region = 'northern california'; the highest number of cities refers to max(count(city))
|
SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many restaurants can you find in Concord?
|
Concord refers to city = 'concord'
|
SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
In which region can you find the top 4 most popular restaurants?
|
the top 4 most popular restaurant refers to top 4 max(review)
|
SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many Chinese restaurants are there on 1st st, Livermore?
|
Chinese restaurant refers to food_type = 'chinese'; 1st st refers to street_name = '1st st'; Livermore refers to city = 'livermore'
|
SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many Indian restaurants are there in the Los Angeles area?
|
Indian restaurant refers to food_type = 'indian'; the Los Angeles area refers to region = 'los angeles area'
|
SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'indian' AND T1.region = 'los angeles area'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
In the Bay Area, what is the most common type of food served by restaurants?
|
the Bay Area refers to region = 'bay area'; the most common type of food refers to max(count(food_type))
|
SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many restaurants in Broadway, Oakland received a review of no more than 3?
|
Broadway refers to street_name = 'broadway'; Oakland refers to city = 'oakland'; a review of no more than 3 refers to review < 3
|
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.street_name = 'broadway' AND T2.review < 3 AND T1.city = 'oakland'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
In which region can you find the highest number of Baskin Robbins restaurants?
|
the highest number refers to max(count(city)); Baskin Robbins restaurant refers to label = 'baskin robbins'
|
SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List all the streets where pizza-serving restaurants are found in San Jose.
|
street refers to street_name; pizza-serving restaurant refers to food_type = 'pizza'; San Jose refers to city = 'san jose'
|
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
How many types of restaurants are there in the Yosemite and Mono Lake area?
| null |
SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area'
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
What is the full address of the most popular restaurant among the diners?
|
full address refers to street_num, street_name, city; the most popular refers to max(review)
|
SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
In which counties can you find the restaurant with the highest number of branches?
|
restaurant refers to label; the highest number of branches refers to max(count(city))
|
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
Which region has the highest number of restaurants?
|
the highest number refers to max(count(id_restaurant))
|
SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
restaurant
|
List the full address of all the American restaurants with a review of 4 or more?
|
full address refers to street_num, street_name, city; American restaurant refers to food_type = 'american'; a review of 4 or more refers to review > 4
|
SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4
|
database name:db_id restaurant
geographic table geographic Cols: city dtype text, country dtype text, region dtype text,
generalinfo table generalinfo Cols: id restaurant dtype integer, label dtype text, food type dtype text, city dtype text, review dtype real,
location table location Cols: id restaurant dtype integer, street number dtype integer, street name dtype text, city dtype text,
|
soccer_2016
|
How many players were born after the year 1985?
|
born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985
|
SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
How many matches were there in May, 2008?
|
in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
|
SELECT COUNT(Match_Id) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
For how many times has player no.41 won the "man of the match" award?
|
player no.41 won the "man of the match" refers to Man_of_the_Match = 41
|
SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Please list the IDs of all the matches in the year 2008.
|
ID of matches refers to Match_Id; in the year 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008'
|
SELECT Match_Id FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
How many players are from Australia?
|
Australia refers to Country_Name = 'Australia'
|
SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Which country is the oldest player from?
|
country refers to Country_Name; the oldest refers to min(DOB)
|
SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
What is the bowling skill of SC Ganguly?
|
SC Ganguly refers to Player_Name = 'SC Ganguly'
|
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Among the players who use the right hand as their batting hand, how many of them were born after 1985?
|
right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; born after 1985 refers to SUBSTR(DOB, 1, 4) > 1985
|
SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Please list the names of the players who use the right hand as their batting hand and are from Australia.
|
name of player refers to Player_Name; right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; Australia refers to Country_Name = 'Australia'
|
SELECT T2.Player_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_id INNER JOIN Batting_Style AS T3 ON T2.Batting_hand = T3.Batting_Id WHERE T1.Country_Name = 'Australia' AND T3.Batting_Hand = 'Right-hand bat'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Please list the bowling skills of all the players from Australia.
|
Australia refers to Country_Name = 'Australia'
|
SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
Among the players whose bowling skill is "Legbreak", when was the oldest one of them born?
|
the oldest refers to min(DOB); date of birth refers to DOB
|
SELECT MIN(T1.DOB) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_Skill = 'Legbreak'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
What is the bowling skill used by most players?
|
bowling skill used by most players refers to max(count(Bowling_Skill))
|
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
soccer_2016
|
What is the name of the player who won the "man of the match" award in the match on 2008/4/18?
|
name of player refers to Player_Name; on 2008/4/18 refers to Match_Date = '2008-04-18'
|
SELECT T2.Player_Name FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match WHERE T1.Match_Date = '2008-04-18'
|
database name:db_id soccer_2016
Batting_Style table Batting_Style Cols: batting id dtype integer, batting hand dtype text,
Bowling_Style table Bowling_Style Cols: bowling id dtype integer, bowling skill dtype text,
City table City Cols: city id dtype integer, city name dtype text, country id dtype integer,
Country table Country Cols: country id dtype integer, country name dtype text,
Extra_Type table Extra_Type Cols: extra id dtype integer, extra name dtype text,
Extra_Runs table Extra_Runs Cols: match id dtype integer, over id dtype integer, ball id dtype integer, extra type id dtype integer, extra runs dtype integer, innings number dtype integer,
Out_Type table Out_Type Cols: out id dtype integer, out name dtype text,
Outcome table Outcome Cols: outcome id dtype integer, outcome type dtype text,
Player table Player Cols: player id dtype integer, player name dtype text, date of birth dtype date, batting hand dtype integer, bowling skill dtype integer, country name dtype integer,
Rolee table Rolee Cols: role id dtype integer, role description dtype text,
Season table Season Cols: season id dtype integer, man of the series dtype integer, orange cap dtype integer, purple cap dtype integer, season year dtype integer,
Team table Team Cols: team id dtype integer, team name dtype text,
Toss_Decision table Toss_Decision Cols: toss id dtype integer, toss name dtype text,
Umpire table Umpire Cols: umpire id dtype integer, umpire name dtype text, umpire country dtype integer,
Venue table Venue Cols: venue id dtype integer, venue name dtype text, city id dtype integer,
Win_By table Win_By Cols: winning id dtype integer, winning type dtype text,
Match table Match Cols: Match_Id dtype integer, team 1 dtype integer, team 2 dtype integer, match date dtype date, season id dtype integer, venue id dtype integer, toss winner dtype integer, toss decide dtype integer, winning type dtype integer, winning margin dtype integer, outcome type dtype integer, match winner dtype integer, man of the match dtype integer,
Ball_by_Ball table Ball_by_Ball Cols: match id dtype integer, over id dtype integer, ball id dtype integer, innings number dtype integer, team batting dtype integer, team bowling dtype integer, striker batting position dtype integer, Striker dtype integer, non striker dtype integer, Bowler dtype integer,
Batsman_Scored table Batsman_Scored Cols: match id dtype integer, over id dtype integer, ball id dtype integer, runs scored dtype integer, innings number dtype integer,
Player_Match table Player_Match Cols: match id dtype integer, player id dtype integer, role id dtype integer, team id dtype integer,
Wicket_Taken table Wicket_Taken Cols: match id dtype integer, over id dtype integer, ball id dtype integer, player out dtype integer, kind out dtype integer, Fielders dtype integer, innings number dtype integer,
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.