QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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%

    【Evidence】
    Napa Valley refers to region = 'Napa Valley'; percentage = divide(count(id_restaurant where region = 'Napa Valley'), count(id_restaurant)) * 100%

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    How many of the cities are in a Bay Area? Bay Area refers to region = 'bay area'

    【Evidence】
    Bay Area refers to region = 'bay area'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    List down the cities with unknown country. unknown county refers to county = 'unknown'

    【Evidence】
    unknown county refers to county = 'unknown'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT city FROM geographic WHERE county = 'unknown'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    Bay Area refers to region = 'bay area'; Santa Clara refers to county = 'santa clara county'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    List down the restaurant ID of restaurants located in Sunnyvale. Sunnyvale refers to city = 'sunnyvale'

    【Evidence】
    Sunnyvale refers to city = 'sunnyvale'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT id_restaurant FROM location WHERE city = 'sunnyvale'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    street number below 1000 refers to street_num < 1000; Railroad St. refers to street_name = 'railroad'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    name refers to label; 24 hour diner refers to food_type = '24 hour diner'; San Francisco refers to city = 'san francisco'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    Ocean St. refers to street_name = 'ocean st'; Santa Cruz refers to city = 'santa cruz'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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

    【Evidence】
    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

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    bakery refers to food_type = 'bakery'; University Avenue refers to street_name = 'university ave.'; Palo Alto refers to city = 'palo alto'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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.'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    winery refers to food_type = 'winery'; street number refers to street_num; "Tulocay Winery" refers to label = 'Tulocay winery'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    Mission Blvd. refers to street_name = 'mission blvd'; Hayward refers to city = 'hayward'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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'

    【Evidence】
    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'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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%'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 restaurant
【Schema】
# Table: generalinfo
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(label:TEXT, Examples: [sparky's diner, kabul afghan cuisine, helmand restaurant]),
(food_type:TEXT, Examples: [24 hour diner, afghani, african]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale]),
(review:REAL, Examples: [2.3, 3.8, 4.0])
]
# Table: geographic
[
(city:TEXT, Primary Key, Examples: [alameda, alamo, albany]),
(county:TEXT, Examples: [alameda county, contra costa county, santa clara county]),
(region:TEXT, Examples: [bay area, napa valley, unknown])
]
# Table: location
[
(id_restaurant:INTEGER, Primary Key, Examples: [1, 2, 3]),
(street_num:INTEGER, Examples: [242, 135, 430]),
(street_name:TEXT, Examples: [church st, el camino real, broadway]),
(city:TEXT, Examples: [san francisco, san carlos, sunnyvale])
]
【Foreign keys】
generalinfo.city=geographic.city
location.city=geographic.city
location.id_restaurant=generalinfo.id_restaurant

    【Question】
    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

    【Evidence】
    review of 2 refers to review = 2; street number below 500 refers to street_num < 500

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: 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