1sf/bird-sql-train-with-schema huggingface dataset:
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: How many Yelp_Business close after 8PM on Mondays?
Evidence: close after 8PM refers to closing_time = '9PM' or closing_time = '10PM' closing_time = '11PM' closing_time = '12PM'; Mondays refers to day_of_week = 'Monday'
SQL: SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Monday' AND T1.closing_time > '8PM'
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Please list the opening time on Mondays of all the Yelp_Businesses in Anthem that are still running.
Evidence: Mondays refers to day_of_week = 'Monday'; in Anthem refers to city = 'Anthem'; are still running refers to active = 'true'
SQL: SELECT T1.opening_time FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.day_of_week LIKE 'Monday' AND T3.city LIKE 'Anthem' AND T3.active LIKE 'True' GROUP BY T1.opening_time
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Among the Yelp_Business in Arizona, how many of them closes at 12PM on Sundays?
Evidence: in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'
SQL: SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.day_of_week LIKE 'Sunday' AND T1.closing_time LIKE '12PM' AND T3.state LIKE 'AZ'
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Please list the categories of the Yelp_Business that closes at 12PM on Sundays.
Evidence: categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'
SQL: SELECT T4.category_name FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business_Categories AS T3 ON T1.business_id = T3.business_id INNER JOIN Categories AS T4 ON T4.category_id = T4.category_id WHERE T1.closing_time = '12PM' AND T2.day_of_week = 'Sunday' GROUP BY T4.category_name
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: How many "Good for Kids" Yelp_Businesses are open everyday of the week?
Evidence: Good for Kids refers to attribute_name = 'Good for Kids'and attribute_value = 'true'; open everyday refers to day_id between 1 and 7
SQL: SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business_Attributes AS T3 ON T1.business_id = T3.business_id INNER JOIN Attributes AS T4 ON T4.attribute_id = T4.attribute_id WHERE T2.day_id IN (1, 2, 3, 4, 5, 6, 7) AND T4.attribute_name = 'Good for Kids' AND T3.attribute_value = 'true'
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: How many users became an elite user the same year they joined Yelp?
Evidence: became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id
SQL: SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = T2.year_id
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: What is the longest business time on Mondays for a Yelp_Business under the category "Shopping"?
Evidence: longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday';  category "Shopping" refers to category_name = 'Shopping'
SQL: SELECT T1.closing_time + 12 - T1.opening_time AS "hour" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id INNER JOIN Business_Categories AS T4 ON T3.business_id = T4.business_id INNER JOIN Categories AS T5 ON T4.category_id = T5.category_id WHERE T2.day_of_week LIKE 'Monday' AND T5.category_name LIKE 'Shopping' ORDER BY T1.closing_time + 12 - T1.opening_time DESC LIMIT 1
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Please list the business IDs of the Yelp_Business that have a business time of longer than 12 hours on Sundays.
Evidence: business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'
SQL: SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T1.closing_time + 12 - T1.opening_time > 12 AND T2.day_of_week LIKE 'Sunday' GROUP BY T1.business_id
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: How many elite users have reviewed Yelp_Business no.1?
Evidence: Yelp_Business no.1 refers to business_id = 1
SQL: SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Among the users who have posted more than 10 reviews, how many users are elite users?
Evidence: posted more than 10 reviews refers to count(Reviews.user_id) > 10
SQL: SELECT COUNT(T4.user_id) FROM ( SELECT T1.user_id FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.user_id IS NOT NULL GROUP BY T3.user_id HAVING COUNT(T3.user_id) > 10 ) T4
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: Which Yelp_Business in Arizona gets the most number of reviews?
Evidence: Arizona refers to state = 'AZ'; gets the most number of reviews refers to max(count(Reviews.business_id))
SQL: SELECT T1.user_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' GROUP BY T1.user_id ORDER BY COUNT(T1.user_id) DESC LIMIT 1
Database: public_review_platform
Tables: Attributes, Categories, Compliments, Days, Years, Business_Attributes, Business_Categories, Business_Hours, Checkins, Elite, Reviews, Tips, Users_Compliments, Business, Users
Columns (table index, column name): -1, *, 0, attribute_id, 0, attribute_name, 1, category_id, 1, category_name, 2, compliment_id, 2, compliment_type, 3, day_id, 3, day_of_week, 4, year_id, 4, actual_year, 5, attribute_id, 5, business_id, 5, attribute_value, 6, business_id, 6, category_id, 7, business_id, 7, day_id, 7, opening_time, 7, closing_time, 8, business_id, 8, day_id, 8, label_time_0, 8, label_time_1, 8, label_time_2, 8, label_time_3, 8, label_time_4, 8, label_time_5, 8, label_time_6, 8, label_time_7, 8, label_time_8, 8, label_time_9, 8, label_time_10, 8, label_time_11, 8, label_time_12, 8, label_time_13, 8, label_time_14, 8, label_time_15, 8, label_time_16, 8, label_time_17, 8, label_time_18, 8, label_time_19, 8, label_time_20, 8, label_time_21, 8, label_time_22, 8, label_time_23, 9, user_id, 9, year_id, 10, business_id, 10, user_id, 10, review_stars, 10, review_votes_funny, 10, review_votes_useful, 10, review_votes_cool, 10, review_length, 11, business_id, 11, user_id, 11, likes, 11, tip_length, 12, compliment_id, 12, user_id, 12, number_of_compliments, 13, business_id, 13, active, 13, city, 13, state, 13, stars, 13, review_count, 14, user_id, 14, user_yelping_since_year, 14, user_average_stars, 14, user_votes_funny, 14, user_votes_useful, 14, user_votes_cool, 14, user_review_count, 14, user_fans
Question: How many stars on average does a Yelp_Business in Anthem get from a user review?
Evidence: in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars)
SQL: SELECT AVG(T2.review_stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Anthem'