Chinastark/bird_dataset huggingface dataset:
Database: public_review_platform
Question: How many businesses have the category named food? List those businesses and find the percentage of businesses with less than 2 stars.
Evidence: businesses have the category named food refer to business_id where category_name = 'Food'; DIVIDE(COUNT(business_id where category_name = 'Food' and stars < 2), COUNT(business_id where category_name = 'Food')) as percentage;
SQL: SELECT T3.business_id, CAST((( SELECT COUNT(business_id) FROM Business WHERE stars < 2 ) - ( SELECT COUNT(business_id) FROM Business WHERE stars > 2 )) AS REAL) * 100 / ( SELECT COUNT(stars) FROM Business ) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.category_name = 'Food'
Database: public_review_platform
Question: Calculate the percentage of businesses with the category name food that are open from 7AM to 8PM in the businesses with the same time.
Evidence: DIVIDE(COUNT(business_id where category_name = 'Food' and opening_time = '7AM' and closing_time = '8PM'), COUNT(business_id where opening_time = '7AM' and closing_time = '8PM')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T3.category_name = 'Food' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.category_name) FROM Business_Categories AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T1.category_id = T3.category_id
Database: public_review_platform
Question: Write down the number of running business with each review count in Cave Creek city.
Evidence: number of running business refers to COUNT(business_id) where active = 'true'; each review count includes review_count = 'High', review_count = 'Medium', review_count = 'Low';
SQL: SELECT SUM(CASE WHEN review_count = 'High' THEN 1 ELSE 0 END) AS high , SUM(CASE WHEN review_count = 'Medium' THEN 1 ELSE 0 END) AS Medium , SUM(CASE WHEN review_count = 'Low' THEN 1 ELSE 0 END) AS low FROM Business WHERE city = 'Cave Creek' AND active = 'true'
Database: public_review_platform
Question: Calculate the yearly average user who started using Yelp from the year of 2005 to 2014.
Evidence: avg(user_id) where user_yelping_since_year BETWEEN '2005' AND '2014';
SQL: SELECT AVG(user_id) FROM Users WHERE user_yelping_since_year >= 2005 AND user_yelping_since_year <= 2015
Database: public_review_platform
Question: What is the active and inactive ratio of the business with the review count of low.
Evidence: DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false'));
SQL: SELECT CAST(SUM(CASE WHEN active = 'true' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN active = 'false' THEN 1 ELSE 0 END) AS radio FROM Business WHERE review_count = 'Low'
Database: public_review_platform
Question: List any five of user ID who became elite user in 2006.
Evidence: year_id = '2006';
SQL: SELECT user_id FROM Elite WHERE year_id = 2006 LIMIT 5
Database: public_review_platform
Question: Write down the any five of ID and name of category that starts with alphabet "P".
Evidence: category that starts with alphabet "P" refers to category_name like 'P%';
SQL: SELECT category_id, category_name FROM Categories WHERE category_name LIKE 'P%' LIMIT 5
Database: public_review_platform
Question: Provide the list of user ID along with review star of which has the review length of medium with business ID of 35.
Evidence: ;
SQL: SELECT user_id, review_stars FROM Reviews WHERE business_id = 15 AND review_length = 'Medium'
Database: public_review_platform
Question: List down the business ID and attribute value of the attribute name of "payment_types_visa".
SQL: SELECT T2.business_id, T2.attribute_value FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'payment_types_visa'
Database: public_review_platform
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
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
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
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
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
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
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
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
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
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
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
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
Database: public_review_platform
Question: Sum up the likes get by short reviews on businesses located in City Goodyear.
Evidence: short reviews refer to tip_length = 'Short';
SQL: SELECT SUM(T2.likes) AS likes FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Goodyear'
Database: public_review_platform
Question: For businesses with long length reviews, which state are they located?
Evidence: businesses with long length tips refer to business_id where tip_length = 'Long';
SQL: SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T2.tip_length = 'Long'
Database: public_review_platform
Question: How much time do businesses in El Mirage City, AZ State operate in average daily?
Evidence: how much time does this business open refers to SUBTRACT(closing_time, opening_time); DIVIDE(SUM(SUBTRACT(closing_time, opening_time)), SUM(Business.business_id))
SQL: SELECT SUM(T2.closing_time - T2.opening_time) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'El Mirage' AND T1.state = 'AZ'
Database: public_review_platform
Question: List down the closing day of businesses located at SC State.
Evidence: closing day refers to SUBTRACT(days.day_id, business_Hours.day_id)
SQL: SELECT T3.day_id - T2.day_id 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.state = 'SC'
Database: public_review_platform
Question: List down the category of businesses whose stars ratings are 5.
Evidence: category of businesses refers to category_name; stars ratings are 5 refers to stars = 5
SQL: SELECT DISTINCT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.stars = 5
Database: public_review_platform
Question: What are the states of businesses with attribute of beer and wine located?
Evidence: with attribute of beer and wine refers to attribute_value = 'beer_and_wine';
SQL: SELECT DISTINCT T2.state FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.attribute_value = 'beer_and_wine'
Database: public_review_platform
Question: How many user's compliment in photo has medium in number?
Evidence: user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium'
SQL: SELECT COUNT(T2.user_id) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type = 'photos' AND T2.number_of_compliments = 'Medium'
Database: public_review_platform
Question: Among businesses with "Wi-Fi" attribute, which businesses id are located at SC State?
Evidence: "Wi-Fi" attribute refers to attribute_name = 'Wi-Fi' AND attribute_value = 'true'
SQL: SELECT T3.business_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'Wi-Fi' AND T2.attribute_value = 'true' AND T3.state = 'SC'
Database: public_review_platform
Question: Sum up the number of business with "ambience_romantic" attribute.
Evidence: "ambience_romantic" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true'
SQL: SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'ambience_romantic' AND T2.attribute_value = 'true'
Database: public_review_platform
Question: What is the percentage of businesses with "Good for Kids" attribute over the other attributes?
Evidence: "Good for Kids" attribute refers to attribute_name = 'Good for Kids' AND attribute_value = 'true'; Calculation = DIVIDE(SUM(attribute_name = 'Good for Kids' AND attribute_value = 'true')), SUM(business_id) * 100
SQL: SELECT CAST(SUM(CASE WHEN attribute_name = 'Good for Kids' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value = 'true'
Database: public_review_platform
Question: How many businesses are not closed in the city of Mesa?
Evidence: businesses are not closed refers to active = 'true'
SQL: SELECT COUNT(business_id) FROM Business WHERE city = 'Mesa' AND active = 'true'
Database: public_review_platform
Question: In how many businesses have customers had a bad or terrible experience?
Evidence: stars = 2 means bad experience; stars = 1 means terrible experience; customers had a bad or terrible experience refers to stars = 2 OR stars = 1
SQL: SELECT COUNT(business_id) FROM Business WHERE stars IN (1, 2)
Database: public_review_platform
Question: List by ID the businesses with the reviews with the lowest veracity of Paradise Valley.
Evidence: ID of businesses refers to business_id; reviews with the lowest veracity refers to review_count = 'Low' AND stars > 3; Paradise Valley is a city
SQL: SELECT business_id FROM Business WHERE stars > 3 AND city = 'Paradise Valley' AND review_count = 'Low'
Database: public_review_platform
Question: How many businesses have more than 1 attribute?
Evidence: businesses have more than 1 attribute refers to COUNT(attribute_value) > 1
SQL: SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_value > 1
Database: public_review_platform
Question: How many businesses are opened the same number of hours every day of the week?
Evidence: how much time does this business open refers to SUBTRACT(closing_time, opening_time); every day of the week refers to day_id BETWEEN 1 AND 7
SQL: SELECT COUNT(business_id) FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'
Database: public_review_platform
Question: How many reviews of businesses that are still open received an uber rating on the funny vote?
Evidence: businesses that still open refers to active = 'true'; business received an uber rating on the funny vote refers to review_votes_funny = 'Uber'
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_votes_funny = 'Uber' AND T1.active = 'true'
Database: public_review_platform
Question: How many of the users who use a high number of compliments do not have any fans?
Evidence: do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High'
SQL: SELECT COUNT(T2.user_id) FROM Users_Compliments AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.number_of_compliments = 'High' AND T2.user_fans = 'None'
Database: public_review_platform
Question: What is the most common type of compliments that a user has received from other users?
Evidence: the most common type of compliments refers to MAX(COUNT(compliment_type))
SQL: SELECT T2.compliment_type FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id GROUP BY T2.compliment_type ORDER BY COUNT(T2.compliment_type) DESC LIMIT 1
Database: public_review_platform
Question: How many stars does each of the 3 top users with the most likes in their reviews have?
Evidence: more likes mean this tip is more valuable; the most likes refers to MAX(likes); stars refers to users_average_stars
SQL: SELECT T2.user_average_stars FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id GROUP BY T2.user_id ORDER BY SUM(T1.likes) DESC LIMIT 3
Database: public_review_platform
Question: In which categories does the only business located in the city of Arcadia appear?
Evidence: categories refers to category_name
SQL: SELECT T1.category_name 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 T3.city = 'Arcadia'
Database: public_review_platform
Question: List by their id all businesses that are open on Sunday.
Evidence: day_of_week = 'Sunday'; open on Sunday refers to day_id = 1
SQL: SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T1.day_id = 1
Database: public_review_platform
Question: How many businesses with music_karaoke attribute are closed?
Evidence: music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false'
SQL: SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'music_karaoke' AND T3.active = 'false' AND T2.attribute_value IN ('none', 'no', 'false')
Database: public_review_platform
Question: How many open businesses in the City of Phoenix have users left a long review?
Evidence: open businesses refers to active = 'true'; long review refers to review_length = 'Long'
SQL: SELECT COUNT(DISTINCT T2.business_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_length = 'Long' AND T2.active = 'true' AND T2.city = 'Phoenix'
Database: public_review_platform
Question: How many users who have received a low cool vote have also received at least 1 low cool vote for some of their reviews?
Evidence: low cool vote for user refers to user_votes_cool = 'Low';  low cool vote for review refers to review_votes_cool = 'Low'
SQL: SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_votes_cool = 'Low' AND T2.review_votes_cool = 'Low'
Database: public_review_platform
Question: How many users with a long tip and 2 likes for their tip have a high number of fans?
Evidence: long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High'
SQL: SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High'
Database: public_review_platform
Question: In how many businesses with the ambience_trendy attribute?
Evidence: ambience_trendy attribute refers to attribute_name = 'ambience_trendy' AND attribute_value = 'false'
SQL: SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'ambience_trendy' AND T2.attribute_value IN ('none', 'no', 'false')
Database: public_review_platform
Question: How many businesses in the city of Scottsdale open on Sunday at 12PM?
Evidence: businesses that opened on Sunday refers to day_of_week = 'Sunday'; businesses that opened at 12PM refers to opening_time = '12PM'
SQL: SELECT COUNT(DISTINCT T2.business_id) 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 = 'Scottsdale' AND T3.day_of_week = 'Sunday' AND T2.opening_time = '12PM'
Database: public_review_platform
Question: What is the average number of stars for businesses in the Obstetricians & Gynecologists category?
Evidence: Obstetricians & Gynecologists category refers to category_name = 'Obstetricians & Gynecologists'; calculation = AVG(stars)
SQL: SELECT CAST(SUM(T1.stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Obstetricians & Gynecologists'
Database: public_review_platform
Question: Calculate the percentage of users with a high number of fans who were elite in 2011.
Evidence: users with a high number of fans refers to user_fans = 'High'; 2011 refers to actual_year = 2011; Calculation = DIVIDE(Elite.user_id where user_fans = 'High' AND actual_year = 2011, Elite.user_id where actual_year = 2011) * 100
SQL: SELECT CAST(SUM(CASE WHEN T3.user_fans = 'High' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.user_fans) FROM Years AS T1 INNER JOIN Elite AS T2 ON T1.year_id = T2.year_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.actual_year = 2011
Database: public_review_platform
Question: How many of the businesses are in Surprise?
Evidence: Surprise is a city
SQL: SELECT COUNT(business_id) FROM Business WHERE city = 'Surprise'
Database: public_review_platform
Question: List down the business ID with a high review count in Tempe.
Evidence: Tempe is a city; high review count refers to review_count = 'High'
SQL: SELECT business_id FROM Business WHERE review_count = 'High' AND city = 'Tempe'
Database: public_review_platform
Question: What is the total number of active businesses in AZ with a medium review count?
Evidence: active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium'
SQL: SELECT COUNT(business_id) FROM Business WHERE review_count = 'Medium' AND state = 'AZ' AND active = 'true'
Database: public_review_platform
Question: List down the business ID with a star range from 3 to 5, located at Chandler.
Evidence: businesses with a star range from 3 to 5 refers to stars BETWEEN 3 AND 5; Chandler is a city
SQL: SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler'
Database: public_review_platform
Question: In users yelping since 2009 to 2011, how many of them have low count of fans?
Evidence: users in yelping since 2009 to 2011 refers to user_yelping_since_year BETWEEN 2009 AND 2011; low count of fans refers to user_fans = 'Low'
SQL: SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year >= 2009 AND user_yelping_since_year < 2012 AND user_fans = 'Low'
Database: public_review_platform
Question: What is the review length of user 11021 to business with business ID 3?
Evidence: review length refers to review_length; user 11021 refers to user_id = 11021; business ID 3 refers to business_id = 3
SQL: SELECT review_length FROM Reviews WHERE user_id = 11021 AND business_id = 3