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: Describe ID and active status of the business under category of "Diagnostic Imaging".
Evidence: ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging';
SQL: SELECT T2.business_id, T3.active FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Diagnostic Imaging'
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: Mention the user ID and their year of joining Yelp who had great experience on business ID 143.
Evidence: year of joining Yelp refers to user_yelping_since_year; great experience refers to Reviews where review_stars = 5;
SQL: SELECT T2.user_id, T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.business_id = 143 AND T1.review_stars = 5
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 user ID with number in compliment of uber on profile, list any 5 user ID and the year when they join Yelp.
Evidence: when join Yelp refers to user_yelping_since_year; compliment_type = 'profile'; number_of_compliments = 'Uber';
SQL: SELECT T3.user_id, T3.user_yelping_since_year FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.compliment_type = 'profile' AND T2.number_of_compliments = 'Uber' LIMIT 5
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: List the user ID, business ID with review length of the business which received the most likes in tips.
Evidence: business which received the most likes refers to business_id where MAX(likes);
SQL: SELECT T1.user_id, T1.business_id, T2.review_length FROM Tips AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id ORDER BY T1.likes 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: Among the elite users of 10 consecutive year from 2005 to 2014, list down the user ID and their number of compliment on photos.
Evidence: from 2005 to 2014 refers to year_id BETWEEN 2005 AND 2014; compliment_type = 'photos';
SQL: SELECT T2.user_id, T2.number_of_compliments FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Elite AS T3 ON T2.user_id = T3.user_id WHERE T3.year_id BETWEEN 2005 AND 2014 AND T1.compliment_type = 'photos'
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: Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday.
Evidence: Sunday refers to day_of_week = 'Sunday' where day_id = 1; opened from 9AM to 9PM refers to Business_Hours where opening_time = '9AM' and closing_time = '9PM'; DIVIDE(COUNT(opening_time = '9AM' and closing_time = '9PM' and day_of_week = 'Sunday'), COUNT(opening_time = NOT NULL and closing_time = NOT NULL and day_of_week = 'Sunday')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T2.opening_time = '9AM' AND T2.closing_time = '9PM' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.day_id) FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday'
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: Write down the ID and opening day of a week for the business which are running in Black Canyon City.
Evidence: running refers to active = 'true'; opening day of a week means days of the week when business is open;
SQL: SELECT T2.business_id, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Black Canyon City' AND T1.active = '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: Within the user who joined Yelp in 2004, explore the user ID with average star of 5 and it's review length on the business.
Evidence: user who joined Yelp in 2004 refers to user_id where user_yelping_since_year = 2014; user_average_stars = 5;
SQL: SELECT T2.user_id, T2.review_length FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2004 AND T1.user_average_stars = 5
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 business ID received the review of 4 star and above by 65% of user? Describe their active status and city.
Evidence: review of 4 star and above refers to stars > 4; DIVIDE(SUM(stars > 4), COUNT(business_id)) = 0.65;
SQL: SELECT DISTINCT T2.business_id, T2.city FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 AND ( SELECT CAST(( SELECT COUNT(DISTINCT T1.user_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 ) AS REAL) * 100 / ( SELECT COUNT(user_id) FROM Users ) > 65 )
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: Calculate the difference between running business in Glendale City and Mesa City.
Evidence: running business refers to business where active = 'true';
SQL: SELECT SUM(CASE WHEN city = 'Glendale' THEN 1 ELSE 0 END) - SUM(CASE WHEN city = 'Mesa' THEN 1 ELSE 0 END) AS diff FROM Business WHERE active = '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 likes did short comment left by users who joined in 2010 get?
Evidence: short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010;
SQL: SELECT SUM(T2.likes) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2010
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: For users with average ratings of 3, what kind of tip length they mostly left?
Evidence: average ratings of 3 refer to user_average_stars = 3; kind of tip length they mostly left refers to tip_length where MAX(COUNT(user_id));
SQL: SELECT T2.tip_length FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_average_stars = 3 GROUP BY T2.tip_length ORDER BY COUNT(T2.tip_length) DESC LIMIT 1