db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
public_review_platform
select t3.business_id 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 inner join business_hours as t4 on t3.business_id = t4.business_id where t4.closing_time > '9pm' and t1.category_name like 'pets'
Question: provide name of businesses whose category is pets and are still opened after 9pm. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at...
provide name of businesses whose category is pets and are still opened after 9pm.
public_review_platform
select count(t2.business_id) 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 inner join business_hours as t4 on t3.business_id = t4.business_id inner join days as t5 on t4.day_id = t5.day_id where t5.day_of_week l...
Question: how many businesses with the category are open from monday to thursday? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id...
how many businesses with the category are open from monday to thursday?
public_review_platform
select count(*) 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 = 'active life' and t3.city = 'phoenix'
Question: please indicate the review count of the 'active life' businesses in phoenix. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribu...
please indicate the review count of the 'active life' businesses in phoenix.
public_review_platform
select t2.business_id 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 like 'men''s clothing' and t3.stars < 5
Question: please list the businesses name with a rating less than 5 whose category name is men's clothing. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_A...
please list the businesses name with a rating less than 5 whose category name is men's clothing.
public_review_platform
select distinct t1.business_id from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t2.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t2.active like 'false' and t1.review_votes_useful like 'low'
Question: which businesses are no longer in business but have a low number of votes useful? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at...
which businesses are no longer in business but have a low number of votes useful?
public_review_platform
select t4.category_name from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t2.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t1.review_length like 'long' and t3.category_id between 1 and 20 group by t...
Question: please list the businesses names whose length of user review is long with business id from 1 to 20. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busines...
please list the businesses names whose length of user review is long with business id from 1 to 20.
public_review_platform
select t2.attribute_value from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t1.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t4.category_name like 'fashion' and t1.city like 'scottsdale'
Question: please provide the attribute values of the bussinesses with fashion in scottsdale. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> a...
please provide the attribute values of the bussinesses with fashion in scottsdale.
public_review_platform
select count(t1.number_of_compliments) from users_compliments as t1 inner join reviews as t2 on t1.user_id = t2.user_id inner join business as t3 on t2.business_id = t3.business_id where t3.city like 'phoenix' and t1.number_of_compliments like 'medium'
Question: how many compliments received from medium users that phoenix city achieved? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribut...
how many compliments received from medium users that phoenix city achieved?
public_review_platform
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 inner join business_hours as t4 on t3.business_id = t4.business_id where t3.city like 'tempe' and t4.opening_time < '8am'
Question: provide the businesses name in tempe city whose opening hours are earlier than 8am. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> ...
provide the businesses name in tempe city whose opening hours are earlier than 8am.
public_review_platform
select count(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 inner join business_hours as t4 on t3.business_id = t4.business_id where t3.city like 'glendale' and t4.opening_time like '8am' and t4...
Question: how many businesses in glendale city that are still running is opened from 8am to 6pm? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes ...
how many businesses in glendale city that are still running is opened from 8am to 6pm?
public_review_platform
select sum(case when t3.city like 'phoenix' then 1 else 0 end) as 'num' , cast(sum(case when t3.city like 'phoenix' then 1 else 0 end) as real) * 100 / count(t3.city) 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_i...
Question: how many businesses are there in phoenix city? find the percentage of businesses in phoenix city in the total city. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actu...
how many businesses are there in phoenix city? find the percentage of businesses in phoenix city in the total city.
public_review_platform
select sum(case when t2.category_name like 'active life' then 1 else 0 end) as 'num' , cast(sum(case when t3.city like 'phoenix' then 1 else 0 end) as real) * 100 / ( select count(t3.review_count) from business_categories as t1 inner join categories as t2 on t1.category_id = t2.category_id inner join business as t3 on ...
Question: how many cities have businesses with active life category? find the percentage of the city where the review count that is low in total review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, da...
how many cities have businesses with active life category? find the percentage of the city where the review count that is low in total review count.
public_review_platform
select count(business_id) from business where city like 'phoenix' and active like 'true'
Question: how many active businesses are there in phoenix? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribut...
how many active businesses are there in phoenix?
public_review_platform
select count(business_id) from business where city like 'scottsdale' and stars > 3
Question: how many businesses in scottsdale are rated as 'wonderful experience'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,...
how many businesses in scottsdale are rated as 'wonderful experience'?
public_review_platform
select cast(sum(stars) as real) / count(business_id) as 'average' from business where active like 'false'
Question: what is the average rating of inactive businesses? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib...
what is the average rating of inactive businesses?
public_review_platform
select count(t1.business_id) from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id where t2.attribute_value like 'beer_and_wine' and t1.state like 'az'
Question: how many businesses in az state have the beer_and_wine attribute? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busi...
how many businesses in az state have the beer_and_wine attribute?
public_review_platform
select t1.city from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id where t2.attribute_value like 'full_bar' group by t1.city
Question: which city has the most businesses whose attribute is full_bar? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busine...
which city has the most businesses whose attribute is full_bar?
public_review_platform
select count(t1.business_id) from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.stars = 5 and t3.category_name like 'fashion'
Question: how many businesses in the fashion industry are rated 5 stars? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busines...
how many businesses in the fashion industry are rated 5 stars?
public_review_platform
select t1.city from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.review_count like 'high' and t3.category_name like 'food' group by t1.city
Question: which city has the highest number of businesses in the food industry whose number of reviews is high? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busin...
which city has the highest number of businesses in the food industry whose number of reviews is high?
public_review_platform
select t1.business_id from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t1.city like 'mesa' and t2.review_stars > 3 group by t1.business_id
Question: please list all business ids in mesa city that review stars of over 3. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,...
please list all business ids in mesa city that review stars of over 3.
public_review_platform
select t1.city from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t2.review_votes_funny like 'low' group by t1.city
Question: which city has the least number of businesses whose amount of funny votes is low? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> at...
which city has the least number of businesses whose amount of funny votes is low?
public_review_platform
select cast(sum(case when t1.stars = 5 then 1 else 0 end) as real) * 100 / count(t1.business_id) as 'percentage' from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.city like 'chan...
Question: what percentage of businesses are in the real estate sector and have the rating of 5 out of all businesses in chandler? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ...
what percentage of businesses are in the real estate sector and have the rating of 5 out of all businesses in chandler?
public_review_platform
select count(user_id) from users where user_yelping_since_year = 2012 and user_votes_funny like 'high'
Question: how many users who started yelping since 2012 have sent a high number of funny votes? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -...
how many users who started yelping since 2012 have sent a high number of funny votes?
public_review_platform
select review_votes_useful from reviews where user_id = 52592 and business_id = 2
Question: what is the number of useful votes that the user 52592 received when reviewed for business number 2? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine...
what is the number of useful votes that the user 52592 received when reviewed for business number 2?
public_review_platform
select attribute_id from attributes where attribute_name like '%payment%'
Question: what are the attribute numbers that are related to payment? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_i...
what are the attribute numbers that are related to payment?
public_review_platform
select review_length from reviews where user_id = 612 and review_stars = 5 and business_id = 2
Question: how long was the review for business number 2 that user number 612 wrote? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_...
how long was the review for business number 2 that user number 612 wrote?
public_review_platform
select count(business_id) from business where city like 'gilbert' and active like 'true'
Question: how many businesses are actively running in gilbert city? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id,...
how many businesses are actively running in gilbert city?
public_review_platform
select count(business_id) from business where state like 'az' and review_count like 'low'
Question: how many businesses in the az state got low quality of reviews? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busine...
how many businesses in the az state got low quality of reviews?
public_review_platform
select distinct t2.business_id from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id where t2.state like 'az' and t1.review_stars = 5 limit 3
Question: please state any three business numbers in az state that have received the 'great experience' review stars. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year....
please state any three business numbers in az state that have received the 'great experience' review stars.
public_review_platform
select t1.attribute_name from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value like 'none' limit 1
Question: please name one attribute that business number 2 does not have. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busine...
please name one attribute that business number 2 does not have.
public_review_platform
select count(t2.compliment_type) from users_compliments as t1 inner join compliments as t2 on t1.compliment_id = t2.compliment_id where t1.user_id = 33 and t2.compliment_type like 'cool'
Question: how many 'cool' compliments did user number 33 receive? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, a...
how many 'cool' compliments did user number 33 receive?
public_review_platform
select t1.closing_time - t1.opening_time as 'opening hours' from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t2.day_of_week like 'friday' and t1.business_id = 53
Question: what are the opening hours of business number 53 on friday? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_i...
what are the opening hours of business number 53 on friday?
public_review_platform
select t1.attribute_name from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value like 'true' and t2.business_id = 56
Question: what are the attributes that business number 56 have? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, att...
what are the attributes that business number 56 have?
public_review_platform
select t2.category_name from business_categories as t1 inner join categories as t2 on t1.category_id = t2.category_id where t1.business_id = 15
Question: what are the categories that business number 15 belongs to? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_i...
what are the categories that business number 15 belongs to?
public_review_platform
select count(t2.business_id) 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 like 'scottsdale' and t1.category_name like 'beauty & spas'
Question: how many businesses are there in scottsdale city under the category of 'beauty & spas'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes...
how many businesses are there in scottsdale city under the category of 'beauty & spas'?
public_review_platform
select t1.user_id from users_compliments as t1 inner join compliments as t2 on t1.compliment_id = t2.compliment_id where t1.number_of_compliments like 'uber' and t2.compliment_type like 'cute' limit 2
Question: please list any two user numbers that have an 'uber' number of cute compliments. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> att...
please list any two user numbers that have an 'uber' number of cute compliments.
public_review_platform
select count(t2.business_id) 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.stars > 3 and t1.category_name like 'accessories'
Question: how many businesses operating in the 'accessories' category have received a 'wonderful experience' review from users? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ac...
how many businesses operating in the 'accessories' category have received a 'wonderful experience' review from users?
public_review_platform
select t2.closing_time - t2.opening_time as 'hour' from business as t1 inner join business_hours as t2 on t1.business_id = t2.business_id where t1.business_id = 12 and t1.city like 'scottsdale' and t2.day_id = 3
Question: how long does business number 12 in scottsdale stay open on day number 3? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_...
how long does business number 12 in scottsdale stay open on day number 3?
public_review_platform
select count(t1.business_id) from business as t1 inner join checkins as t2 on t1.business_id = t2.business_id inner join days as t3 on t2.day_id = t3.day_id where t2.label_time_4 like 'none' and t1.state like 'az' and t3.day_of_week like 'thursday'
Question: how many businesses in az state do not open on thursday? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, ...
how many businesses in az state do not open on thursday?
public_review_platform
select count(business_id) from business where city like 'scottsdale'
Question: how many businesses of yelp are in scottsdale? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_...
how many businesses of yelp are in scottsdale?
public_review_platform
select count(business_id) from business where state like 'az' and active like 'true'
Question: among the yelp_businesses in arizona, how many of them are still running? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_...
among the yelp_businesses in arizona, how many of them are still running?
public_review_platform
select count(business_id) from business where city like 'scottsdale' and stars > 3
Question: how many yelp_businesses in scottsdale have received positive comments in the elitestar rating? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_At...
how many yelp_businesses in scottsdale have received positive comments in the elitestar rating?
public_review_platform
select city from business order by review_count desc limit 1
Question: which city has more yelp_business that's more appealing to users, scottsdale or anthem? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes...
which city has more yelp_business that's more appealing to users, scottsdale or anthem?
public_review_platform
select count(business_id) from business where state like 'az' and stars > 4
Question: how many yelp_businesses in arizona have a elitestar rating of over 4? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,...
how many yelp_businesses in arizona have a elitestar rating of over 4?
public_review_platform
select count(business_id) from business where state like 'az'
Question: how many yelp_businesses are there in arizona in total? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, a...
how many yelp_businesses are there in arizona in total?
public_review_platform
select city from business where stars = 5 group by city
Question: please list the cities of the yelp_businesses that have gotten a 5 in the elitestar rating. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attrib...
please list the cities of the yelp_businesses that have gotten a 5 in the elitestar rating.
public_review_platform
select count(review_length) from reviews where user_id = 3
Question: how many reviews have the user whose id is 3 posted? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attr...
how many reviews have the user whose id is 3 posted?
public_review_platform
select count(review_length) from reviews where user_id = 3 and review_length like 'long'
Question: how many reviews made by user whose id is 3 are long? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, att...
how many reviews made by user whose id is 3 are long?
public_review_platform
select count(review_length) from reviews where user_id = 3 and review_length like 'long' and review_votes_useful like 'medium'
Question: among the long reviews made by user id 3, how many of them have received a medium number of useful votes? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. B...
among the long reviews made by user id 3, how many of them have received a medium number of useful votes?
public_review_platform
select count(user_id) from users where user_yelping_since_year = 2012
Question: how many users have joined yelp since the year 2012? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attr...
how many users have joined yelp since the year 2012?
public_review_platform
select user_id from users where user_fans like 'high' group by user_id
Question: please list the ids of the users who have a high number of followers. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, ...
please list the ids of the users who have a high number of followers.
public_review_platform
select count(t1.attribute_id) from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t1.attribute_name like 'alcohol' and t2.attribute_value like 'none'
Question: how many yelp_businesses do not provide alcohol? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribut...
how many yelp_businesses do not provide alcohol?
public_review_platform
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 like 'alcohol' and t2.attribute_value like 'none' and t3.state like 'az'
Question: among the yelp_businesses in arizona, how many of them do not provide alcohol? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attri...
among the yelp_businesses in arizona, how many of them do not provide alcohol?
public_review_platform
select t2.business_id from attributes as t1 inner join business_attributes as t2 on t1.attribute_id = t2.attribute_id where t1.attribute_name like 'good for kids' and t2.attribute_value like 'true'
Question: please list the business ids of all the yelp_businesses that are good for kids. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attr...
please list the business ids of all the yelp_businesses that are good for kids.
public_review_platform
select count(t1.category_id) from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id where t1.category_name like 'shopping'
Question: how many yelp_business falls under the category of 'shopping'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busines...
how many yelp_business falls under the category of 'shopping'?
public_review_platform
select t1.category_name from categories as t1 inner join business_categories as t2 on t1.category_id = t2.category_id where t2.business_id = 1
Question: under which categories is yelp_business no. 1? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_...
under which categories is yelp_business no. 1?
public_review_platform
select count(t3.business_id) 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 inner join tips as t4 on t3.business_id = t4.business_id where t1.category_name like 'food' and t3.active like 'true'
Question: among the yelp_businesses which are still running, how many of them fall under the category of 'food'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busi...
among the yelp_businesses which are still running, how many of them fall under the category of 'food'?
public_review_platform
select count(t3.business_id) 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 like 'food' and t3.city like 'anthem'
Question: how many yelp_business in anthem are under the category of 'food'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, bus...
how many yelp_business in anthem are under the category of 'food'?
public_review_platform
select t2.business_id 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 like 'food' order by t3.stars desc limit 1
Question: please list the business id of the yelp_business with the highest elitestar rating under the category 'food'. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_yea...
please list the business id of the yelp_business with the highest elitestar rating under the category 'food'.
public_review_platform
select count(t3.stars) 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 inner join business_attributes as t4 on t3.business_id = t4.business_id inner join attributes as t5 on t4.attribute_id = t5.attribute_id where...
Question: how many yelp_business under the category of 'food' are good for kids? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id,...
how many yelp_business under the category of 'food' are good for kids?
public_review_platform
select count(t2.business_id) from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id where t2.state like 'az' and t1.user_id = 3
Question: how many yelp_business in arizona has user no. 3 reviewed? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id...
how many yelp_business in arizona has user no. 3 reviewed?
public_review_platform
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.state like 'az' group by t1.category_name
Question: please list all the categories of the yelp_business in arizona. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busine...
please list all the categories of the yelp_business in arizona.
public_review_platform
select t1.closing_time - t1.opening_time as 'opening hours' from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t2.day_of_week like 'tuesday' and t1.business_id = 1
Question: how long does yelp_business no.1 open on tuesdays? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib...
how long does yelp_business no.1 open on tuesdays?
public_review_platform
select t1.opening_time from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t2.day_of_week like 'tuesday' and t1.business_id = 1
Question: when does yelp_business no.1 open on tuesdays? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_...
when does yelp_business no.1 open on tuesdays?
public_review_platform
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'
Question: how many yelp_business close after 8pm on mondays? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attrib...
how many yelp_business close after 8pm on mondays?
public_review_platform
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
Question: please list the opening time on mondays of all the yelp_businesses in anthem that are still running. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Busine...
please list the opening time on mondays of all the yelp_businesses in anthem that are still running.
public_review_platform
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'
Question: among the yelp_business in arizona, how many of them closes at 12pm on sundays? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attr...
among the yelp_business in arizona, how many of them closes at 12pm on sundays?
public_review_platform
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
Question: please list the categories of the yelp_business that closes at 12pm on sundays. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attr...
please list the categories of the yelp_business that closes at 12pm on sundays.
public_review_platform
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' ...
Question: how many 'good for kids' yelp_businesses are open everyday of the week? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id...
how many 'good for kids' yelp_businesses are open everyday of the week?
public_review_platform
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
Question: how many users became an elite user the same year they joined yelp? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, bu...
how many users became an elite user the same year they joined yelp?
public_review_platform
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.categor...
Question: what is the longest business time on mondays for a yelp_business under the category 'shopping'? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_At...
what is the longest business time on mondays for a yelp_business under the category 'shopping'?
public_review_platform
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
Question: please list the business ids of the yelp_business that have a business time of longer than 12 hours on sundays. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_y...
please list the business ids of the yelp_business that have a business time of longer than 12 hours on sundays.
public_review_platform
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
Question: how many elite users have reviewed yelp_business no.1? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, at...
how many elite users have reviewed yelp_business no.1?
public_review_platform
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
Question: among the users who have posted more than 10 reviews, how many users are elite users? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -...
among the users who have posted more than 10 reviews, how many users are elite users?
public_review_platform
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
Question: which yelp_business in arizona gets the most number of reviews? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, busine...
which yelp_business in arizona gets the most number of reviews?
public_review_platform
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'
Question: how many stars on average does a yelp_business in anthem get from a user review? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> att...
how many stars on average does a yelp_business in anthem get from a user review?
public_review_platform
select avg(t2.review_stars) from business as t1 inner join reviews as t2 on t1.business_id = t2.business_id where t1.state like 'az' and t2.user_id = 3
Question: how many stars on average does user no.3 give to yelp_business in arizona? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute...
how many stars on average does user no.3 give to yelp_business in arizona?
public_review_platform
select t1.closing_time + 12 - t1.opening_time as 'avg opening hours' from business_hours as t1 inner join days as t2 on t1.day_id = t2.day_id where t1.business_id = 1 and (t2.day_of_week = 'sunday' or t2.day_of_week = 'sunday')
Question: what is the average business time for yelp_business no.1 on weekends? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, ...
what is the average business time for yelp_business no.1 on weekends?
public_review_platform
select cast(sum(t3.stars) as real) / count(t1.business_id) as 'average stars' 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'
Question: what is the average elitestar rating for a yelp_business that closes at 12pm on sundays? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attribute...
what is the average elitestar rating for a yelp_business that closes at 12pm on sundays?
public_review_platform
select count(city) from business where city like 'casa grande'
Question: how many of the busineses are in casa grande? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute_v...
how many of the busineses are in casa grande?
public_review_platform
select count(business_id) from business where state like 'az' and active like 'true' and review_count like 'low'
Question: what is the total number of active businesses in az with a low review count? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribu...
what is the total number of active businesses in az with a low review count?
public_review_platform
select business_id from business where city like 'mesa' and stars between 2 and 3
Question: list down the business id with a star range from 2 to 3, located at mesa. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_...
list down the business id with a star range from 2 to 3, located at mesa.
public_review_platform
select count(user_id) from users where user_yelping_since_year between 2011 and 2013 and user_fans like 'high'
Question: in users yelping since 2011 to 2013, how many of them have high count of fans? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attri...
in users yelping since 2011 to 2013, how many of them have high count of fans?
public_review_platform
select review_length from reviews where user_id = 35026 and business_id = 2
Question: what is the review length of user 35026 to business with business id 2? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id...
what is the review length of user 35026 to business with business id 2?
public_review_platform
select distinct t3.attribute_id, t3.attribute_name from business as t1 inner join business_attributes as t2 on t1.business_id = t2.attribute_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t1.review_count = 'low' and t1.city = 'chandler'
Question: among the businesses in chandler, list the attribute of the business with a low review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attr...
among the businesses in chandler, list the attribute of the business with a low review count.
public_review_platform
select count(t1.business_id) from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.stars < 4 and t3.category_name like 'mexican'
Question: in businesses with a category of mexican, how many of them has a star rating below 4? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -...
in businesses with a category of mexican, how many of them has a star rating below 4?
public_review_platform
select t1.business_id, t1.stars from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.active like 'true' and t3.category_name like 'fashion'
Question: list the active business id and its stars of the businesses fall under the category of fashion. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_At...
list the active business id and its stars of the businesses fall under the category of fashion.
public_review_platform
select 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 order by t1.stars desc limit 1
Question: what is the category of businesses with highest star rating? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_...
what is the category of businesses with highest star rating?
public_review_platform
select t4.category_name from reviews as t1 inner join business as t2 on t1.business_id = t2.business_id inner join business_categories as t3 on t2.business_id = t3.business_id inner join categories as t4 on t3.category_id = t4.category_id where t1.review_length like 'medium' and t2.business_id between 6 and 9 order by ...
Question: what is the category of the business with medium review length and highest review stars within business id from 6 t0 9? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, ...
what is the category of the business with medium review length and highest review stars within business id from 6 t0 9?
public_review_platform
select count(t1.business_id) from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t3.attribute_name like 'caters' and t1.review_count like 'low' and t1.active like 'true'
Question: count the active businesses that has an attribute of caters with low review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> a...
count the active businesses that has an attribute of caters with low review count.
public_review_platform
select 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 like 'tempe' order by t1.stars desc limit 1
Question: what is the closing and opening time of businesses located at tempe with highest star rating? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attr...
what is the closing and opening time of businesses located at tempe with highest star rating?
public_review_platform
select t3.category_name, t5.attribute_name from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id inner join business_attributes as t4 on t1.business_id = t4.business_id inner join attributes ...
Question: among the active businesses located at chandler, az, list the category and atrributes of business with a medium review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> yea...
among the active businesses located at chandler, az, list the category and atrributes of business with a medium review count.
public_review_platform
select t3.category_name from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t1.active like 'true' and t1.state like 'az' and t1.city like 'surprise' group by t3.category_name
Question: list the categories of active businesses in surprise, az. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id,...
list the categories of active businesses in surprise, az.
public_review_platform
select t1.city 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 t2.closing_time like '9pm' and t2.opening_time like '8am' and t3.day_of_week like 'friday' group by t1.city
Question: find the location of businesses that have business hours from 8 am to 9 pm every friday. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attribute...
find the location of businesses that have business hours from 8 am to 9 pm every friday.
public_review_platform
select t2.attribute_value from business as t1 inner join business_attributes as t2 on t1.business_id = t2.business_id inner join attributes as t3 on t2.attribute_id = t3.attribute_id where t1.state like 'az' and t1.review_count like 'high' and t1.active like 'true' and t1.city like 'mesa' and t1.stars = 3
Question: what is the attribute value of an active business with a high review count and 3 stars which is located at mesa, az? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, act...
what is the attribute value of an active business with a high review count and 3 stars which is located at mesa, az?
public_review_platform
select distinct t2.opening_time 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 like 'chandler' and t1.active like 'true' and t1.review_count like 'medium'
Question: what is the opening time of the active businesses in chandler that has a medium review count. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attr...
what is the opening time of the active businesses in chandler that has a medium review count.
public_review_platform
select cast(sum(case when t1.stars < 4 then 1 else 0 end) as real) * 100 / count(t1.stars) as 'percentage' from business as t1 inner join business_categories on t1.business_id = business_categories.business_id inner join categories as t3 on business_categories.category_id = t3.category_id where t3.category_name like 'a...
Question: among the businesses with a category of accessories, what is the percentage of the business with less than 4 stars? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actu...
among the businesses with a category of accessories, what is the percentage of the business with less than 4 stars?
public_review_platform
select t2.closing_time, 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 like 'tempe' and t1.active like 'true' and t1.stars > 0.7 * ( select avg(t1.stars) from business as t1 inner join business_hours as t...
Question: list the closing time and day of week of active businesses in tempe with stars greater than the 70% of average age of star rating. | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -...
list the closing time and day of week of active businesses in tempe with stars greater than the 70% of average age of star rating.
public_review_platform
select count(business_id) from business where city like 'phoenix' and active like 'true'
Question: how many active businesses are located at phoenix, arizona? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_i...
how many active businesses are located at phoenix, arizona?
public_review_platform
select count(business_id) from business where review_count like 'high'
Question: how many businesses are with high review count? | Tables: Attributes -> attribute_id, attribute_name. Categories -> category_id, category_name. Compliments -> compliment_id, compliment_type. Days -> day_id, day_of_week. Years -> year_id, actual_year. Business_Attributes -> attribute_id, business_id, attribute...
how many businesses are with high review count?