query
stringlengths 24
325
| positive
stringlengths 1
580
| negative_1
stringlengths 6
580
| negative_2
stringlengths 1
576
| negative_3
stringlengths 1
576
| negative_4
stringlengths 1
580
| negative_5
stringlengths 1
580
| negative_6
stringlengths 1
580
| negative_7
stringlengths 5
576
| negative_8
stringlengths 1
576
| negative_9
stringlengths 1
580
| negative_10
stringlengths 1
580
|
---|---|---|---|---|---|---|---|---|---|---|---|
Which player from "AFS" team has the tallest height? | "AFS" is the tmID; tallest height refers to Max(height) | team name refers to teams.name; won the title 'NBA Coach of the Year' refers to award = 'NBA Coach of the Year'; in 2010 refers to year = 2010 | in 2000 refers to year = 2000; played the least minutes refers to min(minutes); without missing a single game refers to GP = 82; full name of the team refers to teams.name | 2005 refers to year = 2005 ; previous year refers to year = 2004; team with greater winning than previous year refers to Won where year = 2005 > Won where year = 2004; team name refers to tmID | name of team refers to teams.name; between 1980 and 2000 refers to year between 1980 and 2000; ranked first five or more times refers to count(rank = 1) > = 5; lost a league two or more times refers to lost > 2 | final round of post season refers to round = 'CSF'; won against LAL refers to tmIDLoser = 'LAL'; in the NBA league refers to lgID = 'NBA'; won more than 60 games refers to won > 60 | greater than 75% lost refers to Divide(lost, games) > 0.75; team refers to tmID | from 1937 to 1940 refers to year between 1937 and 1940; player with highest point refers to Max(points) | full name of the team refers to teams.name; in 2001 refers to year = 2001; didn't make the playoffs refers to PostGP = 0; won the most games refers to max(won) | beat the Huston refers to tmIDLoser = 'HSM'; in final round of post season refers to round = 'DSF' | "BLB" is the tmID |
Name the team in which the coach won the title 'NBA Coach of the Year' in 2010. | team name refers to teams.name; won the title 'NBA Coach of the Year' refers to award = 'NBA Coach of the Year'; in 2010 refers to year = 2010 | coach refers to coachID; Oklahoma City Thunder refers to name = 'Oklahoma City Thunder' | player name refers to playerID; the youngest refers to max(birthDate); won "Rookie of the Year" refers to award = 'Rookie of the Year' | "Denver Nuggets" is the name of team; since 1980 refers to year > 1980; tallest player = Max(height) | NBA refers to lgID = 'NBA'; 'LAL' team refers to tmID = 'LAL'; performed steals movement refers to steals > 0; percent = divide(count(playerID where steals > 0), count(playerID)) where lgID = 'NBA' and tmID = 'LAL' * 100% | "AFS" is the tmID; tallest height refers to Max(height) | in 2000 refers to year = 2000; played the least minutes refers to min(minutes); without missing a single game refers to GP = 82; full name of the team refers to teams.name | played more than 3800 points refers to Sum(points) > = 3800 | 1970 to 1980 refers to year between 1970 and 1980; longest serving coach Max(Count(coachID)); team(s) he served refers to tmID | more than 2 different teams refers to count(tmID) > 2 | full attendance refers to GP = 82; in 1995 refers to year = 1995; the most turnovers refers to max(turnovers); full name refers to first_name, last_name |
Which team(s) has greater than 75% lost among all the games played. | greater than 75% lost refers to Divide(lost, games) > 0.75; team refers to tmID | year 1990-1995 refers to year between 1990 and 1995; 'adelmri01' is the coachID; offense point refers to o_fgm | full name refers to firstName, middleName, lastName; in the year 1997 refers to year = 1997; the most steals refers to max(steals) | full name refers to firstName, middleName, lastName; in 1973 refers to year = 1973; not born in USA refers to birthCountry <> 'USA' | team name refers to teams.name; won the title 'NBA Coach of the Year' refers to award = 'NBA Coach of the Year'; in 2010 refers to year = 2010 | the scoring champion refers to max(won); 2001 refers to year = 2001; NBA refers to lgID = 'NBA' | champion refers to round = 'F'; team name refers to teams.name; from year 1950 to 1960 refers to year between 1950 and 1960 | more than 50 games won refers to won > 50 | full attendance refers to GP = 82; in 1995 refers to year = 1995; the most turnovers refers to max(turnovers); full name refers to first_name, last_name | in 2000 refers to year = 2000; played the least minutes refers to min(minutes); without missing a single game refers to GP = 82; full name of the team refers to teams.name | "ABA Coach of the Year" is the award; highest number of won games refers to Max(Count(won)) |
How many field goals did George Mikan make overall between 1951 and 1953? | between 1951 and 1953 refers to season_id; field goal refers to fg_made | more than 2 different teams refers to count(tmID) > 2 | in 1969 refers to year = 1969; awarded "NBA Coach of the Year" refers to award = 'NBA Coach of the Year'; percentage = divide(count(coachID where year = 1969 and award = 'NBA Coach of the Year'), count(coachID)) * 100% | champion refers to round = 'F'; team name refers to teams.name; from year 1950 to 1960 refers to year between 1950 and 1960 | full name refers to firstName, middleName, lastName; in the year 1997 refers to year = 1997; the most steals refers to max(steals) | drafted in the 1st round refers to draftRound = 1; 6th position refers to draftSelection = 6; in 1976 refers to year = 1976; team refers to tmID | No.1 draft pick refers to draftRound = 1; in the 2003 season refers to draftyear = 2003; increase = subtract(divide(sum(won), add(sum(won), sum(lost))) where draftyear = 2004, divide(sum(won), add(sum(won), sum(lost))) where draftyear = 2003) | "UCLA" is the college; team with most players refers to tmID where Max(Count(playerID)) | team name refers to teams.name; won the title 'NBA Coach of the Year' refers to award = 'NBA Coach of the Year'; in 2010 refers to year = 2010 | Wake Forest college refers to highSchool = 'Wake Forest college'; did the most offensive rebounds than defensive rebounds refers to max(subtract(sum(oRebounds), sum(dRebounds))); full name refers to first_name, middle_name, last_name | in 1937 refers to year = 1937; player got at least 500 points refers to Sum(points) > = 500 |
Find out which business ID are opened all the time. | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment'; | in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | 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; | 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'; | AVG(user_yelping_since_year) where user_id from Elite; | Tempe is a city; high review count refers to review_count = 'High' | can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true' |
Among the businesses in Chandler, list the attribute of the business with a low review count. | in Chandler refers to city = 'Chandler'; attribute refers to attribute_name | 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'; | 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 | type of compliments refers to compliment_type; user No. refers to user_id; | in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol' | more appealing to users refers to MAX(review_count); | joined yelp since 2004 refers to user_yelping_since_year = 2004; | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | 9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city | AVG(user_yelping_since_year) where user_fans = 'uber'; | user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium' |
List down the category of businesses whose stars ratings are 5. | category of businesses refers to category_name; stars ratings are 5 refers to stars = 5 | less than 5 low compliment refers to number_of_compliments < 5 | how long was the review refers to review_length; business number refers to business_id; user number refers to user_id; | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0); | false | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3 | user No. refers to user_id; |
Calculate difference between business that have the highest number of reviews and business that have the lowest number of reviews. | highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id)))) | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | businesses with long length tips refer to business_id where tip_length = 'Long'; | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | Yelp_Business no.1 refers to business_id = 1 | inactive business refers to active = 'FALSE'; 'AZ' is the state; 'Phoenix' is the name of city; medium review count refers to review_count = 'Medium'; 3.5 stars refers to stars = 3.5 | business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id; | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM'; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | businesses in "Pets" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100% |
How many stars on average does user no.3 give to Yelp_Business in Arizona? | user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3)) | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000; | opened for 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true' | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | how long was the review refers to review_length; business number refers to business_id; user number refers to user_id; | 12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday' | category refers to category_name; highest review stars refers to max(review_stars); business ID from 6 to 9 refers to business_id between 6 and 9 | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% |
How many Yelp_Business in Anthem are under the category of "Food"? | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | active business refers to active = 'true'; 'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars > avg(stars) * 60% | category refers to category_name | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | category refers to category_name; highest review stars refers to max(review_stars); business ID from 6 to 9 refers to business_id between 6 and 9 | percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0); | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; | uber number of fans refers to user_fans = 'uber'; | medium length tip refers to tip_length = 'Medium'; |
In businesses with a category of mexican, how many of them has a star rating below 4? | category of mexican refers to category_name = 'Mexican'; star rating below 4 refers to stars < 4 | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | average review = Divide(Count(user_id), Count(business_id)) | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | type of compliments refers to compliment_type; user No. refers to user_id; | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | "ambience_romantic" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true' | state refers to city | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | business No. refers to business_id; have TV refers to attribute_name = 'Has TV'; |
What is the average business time for Yelp_Business no.1 on weekends? | Yelp_Business no.1 refers to business_id = 1; on weekends refers to day_of_week = 'Saturday' or day_of_week = 'Sunday'; average business time refers to DIVIDE(SUBTRACT(closing_time, opening_time), 2) | with great experience refers to stars = 5 | active business refers to active = 'true'; category of Fashion refers to category = 'Fashion' | rating more than 2 refers to stars > 2; | state refers to city | operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count) | medium refers to number_of_compliments = 'Medium'; | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | the most reviews refer to MAX(user_id); | short tip refers to tip_length = 'Short'; business category refers to category_name | user yelping since 2010 to 2012 refers to user_yelping_since_year > = '2010' AND user_yelping_since_year < '2013'; low fans refers to user_fans = 'Low' |
What business category is the Yelp business which got the most 5 star reviews in? | business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5)); | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | user yelping since 2010 to 2012 refers to user_yelping_since_year > = '2010' AND user_yelping_since_year < '2013'; low fans refers to user_fans = 'Low' | average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012 | best elite refers to user_average_stars = 5; worse eliter refers to user_average_stars = 1: in 2013 refers to year_id = 2013; ratio = Divide(Count(user_id(user_average_stars = 5)), Count(user_id(user_average_stars = 1))) | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010; | 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; | Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino')); | active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name |
Calculate the difference between running business in Glendale City and Mesa City. | running business refers to business where active = 'true'; | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars; | in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3 | average review = Divide(Count(user_id), Count(business_id)) | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' | high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year) |
Find out which hotel and travel business having the most review? Calculate the standard deviation of the review star for this business. | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | active business refers to active = 'true'; category of Fashion refers to category = 'Fashion' | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; | photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High' | business number refers to business_id; | users refer to user_id; review_votes_funny = 'uber'; | users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High'; | still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM'; | music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false' | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' |
Count the active businesses that has an attribute of caters with low review count. | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | running business refers to business where active = 'true'; | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert' | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | close after 8PM refers to closing_time = '9PM' or closing_time = '10PM' closing_time = '11PM' closing_time = '12PM'; Mondays refers to day_of_week = 'Monday' | business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5)); | user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute'; | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | since year 2012 refers to user_yelping_since_year = '2012' | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; |
Among the businesses with a category of Local Services, what is the percentage of the business with less than 3 stars? | "Local Services" is the category_name; less than 3 stars refers to stars < 3; percentage = Divide(Count(business_id(stars < 3)), Count(business_id)) * 100 | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | 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; | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert' | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | state refers to city | average review = Divide(Count(user_id), Count(business_id)) |
Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday. | 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; | opened for 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true' | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name; | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id; | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; |
How many users with a long tip and 2 likes for their tip have a high number of fans? | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | active business refers to active = 'true'; 'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars > avg(stars) * 60% | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name | 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services' | shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM'; | AZ refers to state = 'AZ'; stars < 3; | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | with great experience refers to stars = 5 | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000; |
How many 2 stars rated business located in Phoenix, Arizona? | located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ' | closed at 8PM refers to closing_time = '8PM'; | under the category of "Food" refers to category_name = 'Food'; are good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High' | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | Tempe is a city; high review count refers to review_count = 'High' | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | long refers to review_length = 'Long'; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | "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 | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); |
What is the yearly average review done by user ID 3? | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | businesses with long length tips refer to business_id where tip_length = 'Long'; | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | 12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday' | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' | closed at 8PM refers to closing_time = '8PM'; | are still running refers to active = 'true'; the category of "Food" refers to category_name = 'Food' | user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute'; | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | "Scottsdale" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name |
What city does the business have a business hour from 10 am to 12 pm on Sunday? | 10 am refers to opening_time = '10AM'; 12 pm refers to closing_time = '12PM'; on Sunday refers to day_of_week = 'Sunday' | types of music refers to attribute_name LIKE '%music%' WHERE attribute_value = 'true'; business No. refers to business_id;
| in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | Yelp_Business no.1 refers to business_id = 1; open on refers to opening_time; Tuesdays refers to day_of_week = 'Tuesday' | businesses are not closed refers to active = 'true' | business number refers to business_id; | "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 | AVG(user_yelping_since_year) where user_id from Elite; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; |
List the active business ID and its stars of the businesses fall under the category of Fashion. | active business refers to active = 'true'; category of Fashion refers to category = 'Fashion' | category of businesses refers to category_name; stars ratings are 5 refers to stars = 5 | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name | medium length tip refers to tip_length = 'Medium'; | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | active business refers to active = 'true'; 'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars > avg(stars) * 60% | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id)); | uber number of fans refers to user_fans = 'uber'; | active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state |
How many users have joined Yelp since the year 2012? | since year 2012 refers to user_yelping_since_year = '2012' | still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM'; | user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute'; | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | 5-star refers to stars = 5; in Ahwatukee refers to city = 'Ahwatukee'; business category refers to category_name | "Gilbert" is the name of city; highest star rating refers to Max(stars) | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | inactive business refers to active = 'FALSE'; 'AZ' is the state; 'Phoenix' is the name of city; medium review count refers to review_count = 'Medium'; 3.5 stars refers to stars = 3.5 | open businesses refers to active = 'true'; long review refers to review_length = 'Long' | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0; |
Sum up the number of business with "ambience_romantic" attribute. | "ambience_romantic" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true' | music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false' | 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; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | short tip refers to tip_length = 'Short'; business category refers to category_name | AVG(user_yelping_since_year) where user_fans = 'uber'; | photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High' | no longer in business refers to active = 'False'; low number of votes useful refers to review_votes_useful = 'Low'; |
User No."63469" has got "1" like for a tip to the Yelp business, which city is that business located in? | user No. refers to user_id; | AZ refers to state = 'AZ'; stars < 3; | attribute_value = 'beer_and_wine' | the most common type of compliments refers to MAX(COUNT(compliment_type)) | the most reviews refer to MAX(user_id); | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | Arizona refers to state = 'AZ'; still running refers to active = 'true'; | categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year) | business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5)); |
Which city has more Yelp_Business that's more appealing to users, Scottsdale or Anthem? | more appealing to users refers to MAX(review_count); | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High' | uber number of fans refers to user_fans = 'uber'; | user No. refers to user_id; short tip refers to tip_length = 'short'; category refers to category_name; | attribute name which start with "music" refers to attribute_name LIKE 'music%' | year has the most elite users refers to year_id with MAX(user_id); | closed at 8PM refers to closing_time = '8PM'; | name of business refers to category_name; | drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000; |
Please list all the categories of the Yelp_Business in Arizona. | categories refers to category_name; in Arizona refers to state = 'AZ' | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id)); | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | with great experience refers to stars = 5 | 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)) | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler' | actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson'; | year has the most elite users refers to year_id with MAX(user_id); | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year |
Among the Yelp_Businesses which are still running, how many of them fall under the category of "Food"? | are still running refers to active = 'true'; the category of "Food" refers to category_name = 'Food' | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | 10 am refers to opening_time = '10AM'; 12 pm refers to closing_time = '12PM'; on Sunday refers to day_of_week = 'Sunday' | high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1 | business No. refers to business_id; have TV refers to attribute_name = 'Has TV'; | "Shopping Centers" is the category_name; high review count refers to review_count = 'High' | percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0); | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | "Tempe" is the name of city; long review refers to review_length = 'Long' | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' |
Among the Yelp_Business in Arizona, how many of them closes at 12PM on Sundays? | in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1 | under the category "Food" refers to category_name = 'Food' | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | "Scottsdale" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name | longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday'; category "Shopping" refers to category_name = 'Shopping' | user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium' | actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber' | do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'
| opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; |
Find the Yelp user with the average 5-star rating of all reviews who has been yelping the longest. | Yelp user refers to user_id; average 5-star rating refers to user_average_stars = 5; yelping the longest refers to min(user_yelping_since_year) | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High'; | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | the most common type of compliments refers to MAX(COUNT(compliment_type)) | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | in Casa Grande refers to city = 'Casa Grande' | average review = Divide(Count(user_id), Count(business_id)) |
Calculate the yearly average user who started using Yelp from the year of 2005 to 2014. | avg(user_id) where user_yelping_since_year BETWEEN '2005' AND '2014'; | short reviews refer to tip_length = 'Short'; | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); | open businesses refers to active = 'true'; long review refers to review_length = 'Long' | AVG(user_yelping_since_year) where user_id from Elite; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | AZ refers to state = 'AZ'; stars < 3; | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | state refers to city | good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'
|
How many "cute" type of compliments does user No. 57400 get? | type of compliments refers to compliment_type; user No. refers to user_id; | businesses with long length tips refer to business_id where tip_length = 'Long'; | shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM'; | Arizona refers to state = 'AZ'; still running refers to active = 'true'; | users refer to user_id; review_votes_funny = 'uber'; | close after 8PM refers to closing_time = '9PM' or closing_time = '10PM' closing_time = '11PM' closing_time = '12PM'; Mondays refers to day_of_week = 'Monday' | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | active businesses in Arizona refer to business_id where state = 'Arizona' and active = 'true'; work after 12PM refer to opening_time > '12PM'; |
How many active businesses from Casa Grande are registered in the database? | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false' | opening times of 7AM and closing times of 8PM refer to Business_Hours where opening_time = '7AM' and closing_time = '8PM'; active business refers to business_id where active = 'true'; | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012 | attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%'; | 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services' | categories refers to category_name | short tip refers to tip_length = 'Short'; business category refers to category_name | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) |
Provide business ids with opening hours 10AM on Saturday. | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | located in "Phoenix" refers to city = 'Phoenix'; received a "5" star review refers to review_stars = '5'; "uber" number of votes for funny refers to review_votes_funny = 'Uber' | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday'; category "Shopping" refers to category_name = 'Shopping' | became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | AZ refers to state = 'AZ'; stars < 3; | drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000; | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); |
What is the ratio of good to bad business star for a businesses that are opened all the time? | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | Arizona refers to state = 'AZ'; still running refers to active = 'true'; | short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars); | long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium'; | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | "Gilbert" is the name of city; highest star rating refers to Max(stars) | opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM'; | 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)) | low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012 |
How many businesses in Arizona having an average review less than 3 stars? | businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0; | in Chandler refers to city = 'Chandler'; attribute refers to attribute_name | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | false | located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ' | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false')); | open businesses refers to active = 'true'; long review refers to review_length = 'Long' |
How many active businesses of city are underrated? | active businesses refers to active = 'true'; underrated refers to review_count = 'Low'; | located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ' | less than 5 low compliment refers to number_of_compliments < 5 | "Good for Groups" and "Good for Dancing" are attribute_name; active business refers to active = true' | in Casa Grande refers to city = 'Casa Grande' | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3 | false | more appealing to users refers to MAX(review_count); | "Tempe" is the name of city; long review refers to review_length = 'Long' | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); |
Indicate the business id and days which are opened from 8AM to 6PM. | opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id; | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | 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 | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5)); | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium'; | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; | ID number refers to attribute_id |
Which business ID has the most reviews? | the most reviews refer to MAX(user_id); | in Glendale refers to city = 'Glendale' | user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3)) | medium reviews refers to review_length = 'Medium'; | rating more than 2 refers to stars > 2; | business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5)); | no longer in business refers to active = 'False'; low number of votes useful refers to review_votes_useful = 'Low'; | opening times of 7AM and closing times of 8PM refer to Business_Hours where opening_time = '7AM' and closing_time = '8PM'; active business refers to business_id where active = 'true'; | photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High' | active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler' | "Tempe" is the name of city; long review refers to review_length = 'Long' |
State the state of businesses which have closing time at 12AM. | state refers to city | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | bars refers to category_name = 'Bars'; | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) | in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol' | "Gilbert" is the name of city; high review count refers to review_count = 'High' | number of useful votes refers to review_votes_useful; business number refers to business_id; | user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium' | AVG(user_yelping_since_year) where user_id from Elite; |
How many businesses are there in Phoenix city? Find the percentage of businesses in Phoenix city in the total city. | percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0); | businesses in "Pets" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100% | 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 | actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson'; | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | automotive businesses refers to category_name = 'Automotive'; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Automotive'), COUNT(business_id)), 1.0); | business number refers to business_id; | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino')); | "South Carolina" and "California" are both state; average review stars from users = Divide((Sum(review_stars(state = 'SC')) + Sum(review_stars(state = 'CA'))), Sum(stars)) | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; |
How long does business number 12 in Scottsdale stay open on day number 3? | business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id; | 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; | medium reviews refers to review_length = 'Medium'; | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | medium refers to number_of_compliments = 'Medium'; | Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars; | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100% | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; |
Who has got the most number of "funny" type of compliments? Give the user ID. | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | beer_and_wine refers to attribute_value = 'beer_and_wine'; | user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute'; | with great experience refers to stars = 5 | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; | Yelp_Business no.1 refers to business_id = 1 | under the category of "Food" refers to category_name = 'Food'; are good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | average ratings of at least 4 refers to user_average_stars > = 4; no fans or followers refers to user_fans = 'None'; percentage = divide(count(user_id where user_average_stars > = 4 and user_fans = 'None'), sum(user_id where user_average_stars > = 4))*100% | AVG(user_yelping_since_year) where user_id from Elite; |
Among the long reviews made by user ID 3, how many of them have received a medium number of useful votes? | long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium'; | active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High' | 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; | Yelp_Business no.1 refers to business_id = 1 | 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 | under the category "Food" refers to category_name = 'Food' | ; | 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; | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) | running business refers to business where active = 'true'; | on Sunday refers to day_of_week = 'Sunday' |
How many "5" star reviews does the Yelp business No. "10682" get? | 5 star reviews refers to review_stars = 5; business No. refers to business_id; | actively running refers to active = 'true'; | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars; | 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 | the most common type of compliments refers to MAX(COUNT(compliment_type)) | less than 5 low compliment refers to number_of_compliments < 5 | best elite refers to user_average_stars = 5; worse eliter refers to user_average_stars = 1: in 2013 refers to year_id = 2013; ratio = Divide(Count(user_id(user_average_stars = 5)), Count(user_id(user_average_stars = 1))) | longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday'; category "Shopping" refers to category_name = 'Shopping' | medium length of review refers to review_length = 'Medium' | percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100% |
How many Yelp_Business in Arizona has user no. 3 reviewed? | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | 1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday' | most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert' | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | name of business refers to category_name; | average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012 | ; | since year 2012 refers to user_yelping_since_year = '2012' | opened for 24/7 refers to Business_Hours WHERE opening_time = closing_time and business_id COUNT(day_id) = 7; business attribute refers to attribute_name |
How many users manage to get uber votes for all of the review category? Find out what are the user average star. | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | on Sunday refers to day_of_week = 'Sunday' | 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; | since year 2012 refers to user_yelping_since_year = '2012' | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | "ambience_romantic" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true' | more appealing to users refers to MAX(review_count); | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | attribute_value = 'beer_and_wine' | 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 |
How many businesses are actively running in Gilbert City? | actively running refers to active = 'true'; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | Tempe is a city; high review count refers to review_count = 'High' | closed at 8PM refers to closing_time = '8PM'; | categories refers to category_name; Yelp_Business no.1 refers to business_id = 1 | bars refers to category_name = 'Bars'; | opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM'; | "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 |
In which year did the user who has given the most number of "short" tips join the Yelp? | year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short')); | good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'
| attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%'; | 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services' | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010; | categories refers to category_name | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) | categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | 5-star refers to stars = 5; in Ahwatukee refers to city = 'Ahwatukee'; business category refers to category_name | Yelp_Business no.1 refers to business_id = 1 |
Among all closed businesses in Avondale, AZ what percent have obtained a 'wonderful experience' rating of the business. | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count) | bars refers to category_name = 'Bars'; | joined yelp since 2004 refers to user_yelping_since_year = 2004; | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | "ambience_romantic" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true' | in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol' |
Sum up the likes get by short reviews on businesses located in City Goodyear. | short reviews refer to tip_length = 'Short'; | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | attribute_value = 'beer_and_wine' | running business refers to business where active = 'true'; | active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name | business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday' | 9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city | active businesses refers to active = 'true'; in Tempe refers to city = 'Tempe'; with stars greater than the 70% of average age of star rating refers to stars > DIVIDE(sum(stars), COUNT(business_id)) * 70% | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); |
Is the Yelp business No. 14033 good for supper? | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | more appealing to users refers to MAX(review_count); | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | 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 | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name; | in Chandelier refers to city = 'Chandelier'; percentage = divide(count(business_id where review_votes_funny = 'Low'), count(business_id)); business with low funny votes refers to review_votes_funny = 'Low' | 1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday' | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0; |
How many user's compliment in photo has medium in number? | user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium' | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars); | close after 8PM refers to closing_time = '9PM' or closing_time = '10PM' closing_time = '11PM' closing_time = '12PM'; Mondays refers to day_of_week = 'Monday' | short tip refers to tip_length = 'Short'; business category refers to category_name | users refer to user_id; review_votes_funny = 'uber'; | opened for 24/7 refers to Business_Hours WHERE opening_time = closing_time and business_id COUNT(day_id) = 7; business attribute refers to attribute_name | active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' | opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id; | active businesses refers to active = 'true'; Phoenix refers to city = 'Phoenix'; |
How long was the review for business number 2 that user number 612 wrote? | how long was the review refers to review_length; business number refers to business_id; user number refers to user_id; | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | active businesses refers to active = 'true'; underrated refers to review_count = 'Low'; | uber number of fans refers to user_fans = 'uber'; | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson'; | business No. refers to business_id; have TV refers to attribute_name = 'Has TV'; | automotive businesses refers to category_name = 'Automotive'; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Automotive'), COUNT(business_id)), 1.0); |
List out which business category that are most likely to have average good review in Arizona? | average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name | in 2012 refers to actual_year = 2012; | operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count) | music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false' | 12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday' | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'
| short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) |
How many "cool" type compliments does user No. 41717 get? | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | businesses in "Pets" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100% | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1 | average ratings of at least 4 refers to user_average_stars > = 4; no fans or followers refers to user_fans = 'None'; percentage = divide(count(user_id where user_average_stars > = 4 and user_fans = 'None'), sum(user_id where user_average_stars > = 4))*100% | opening hours refers to opening_time; category refers to category_name; | DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false')); | 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)) | Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4; | more appealing to users refers to MAX(review_count); | open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars); |
How many businesses in Glendale are reviewed by user with the ID of 20241? | in Glendale refers to city = 'Glendale' | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ' | "Gilbert" is the name of city; high review count refers to review_count = 'High' | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' | "Good for Groups" and "Good for Dancing" are attribute_name; active business refers to active = true' | average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name | active business refers to active = 'true'; 'Pets' is the category_name | average review = Divide(Count(user_id), Count(business_id)) | business which received the most likes refers to business_id where MAX(likes); |
Which businesses with the category name Accessories have opening hours before 7AM? | opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id; | average review = Divide(Count(user_id), Count(business_id)) | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | location of businesses refers to city and state; business hours from 8 am to 9 pm refers to opening_time = '8AM', closing_time = '9PM'; every Friday refers to day_of_week = 'Friday' | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services' | "Gilbert" is the name of city; highest star rating refers to Max(stars) | became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | under the category "Food" refers to category_name = 'Food' |
List the closing time and day of week of active businesses in Scottsdale with stars greater than the 60% of average age of star rating. | active business refers to active = 'true'; 'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars > avg(stars) * 60% | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' | in Chandler refers to city = 'Chandler'; attribute refers to attribute_name | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; | 1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday' | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | 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; | DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false')); | name of business refers to category_name; | located in "Phoenix" refers to city = 'Phoenix'; received a "5" star review refers to review_stars = '5'; "uber" number of votes for funny refers to review_votes_funny = 'Uber' |
List at least 5 users that has received less than 5 low compliments from
other users. | less than 5 low compliment refers to number_of_compliments < 5 | 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)) | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging'; | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | Yelp_Business no.1 refers to business_id = 1; on weekends refers to day_of_week = 'Saturday' or day_of_week = 'Sunday'; average business time refers to DIVIDE(SUBTRACT(closing_time, opening_time), 2) | average review = Divide(Count(user_id), Count(business_id)) | joined yelp since 2004 refers to user_yelping_since_year = 2004; | opening hours refers to opening_time; category refers to category_name; | active businesses refers to active = 'true'; Phoenix refers to city = 'Phoenix'; | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) |
How many Yelp businesses are there in 'AZ' with less than "3" stars? | AZ refers to state = 'AZ'; stars < 3; | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High' | state refers to city | state refers to city | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | 5-star refers to stars = 5; in Ahwatukee refers to city = 'Ahwatukee'; business category refers to category_name | year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short')); | user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3)) | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' |
Among the working days from Monday to Saturday, which businesses with the category names work the most days? | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | location of businesses refers to city and state; business hours from 8 am to 9 pm refers to opening_time = '8AM', closing_time = '9PM'; every Friday refers to day_of_week = 'Friday' | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | Tempe is a city; high review count refers to review_count = 'High' | "Shopping Centers" is the category_name; high review count refers to review_count = 'High' | user yelping since 2010 to 2012 refers to user_yelping_since_year > = '2010' AND user_yelping_since_year < '2013'; low fans refers to user_fans = 'Low' | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | "Tempe" is the name of city; long review refers to review_length = 'Long' |
Indicate the opening hours of businesses are with category in fashion. | opening hours refers to opening_time; category refers to category_name; | category of businesses refers to category_name; stars ratings are 5 refers to stars = 5 | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) | Tempe is a city; high review count refers to review_count = 'High' | short tip refers to tip_length = 'Short'; business category refers to category_name | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | "South Carolina" and "California" are both state; average review stars from users = Divide((Sum(review_stars(state = 'SC')) + Sum(review_stars(state = 'CA'))), Sum(stars)) | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) |
What is the total number of active business in AZ with a high review count? | active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High' | 9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name | users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High'; | active business refers to active = 'true'; 'Pets' is the category_name | 1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday' | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars); | ; | do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'
|
What percentage more for the "Women's Clothing" Yelp businesses to "Men's Clothing"? | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | are still running refers to active = 'true'; the category of "Food" refers to category_name = 'Food' | high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year) | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | attribute_value = 'beer_and_wine' | ; | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | state refers to city | in 2012 refers to actual_year = 2012; | type of compliments refers to compliment_type; user No. refers to user_id; | category of mexican refers to category_name = 'Mexican'; star rating below 4 refers to stars < 4 |
Among the businesses in Tempe, list the attribute of the business with a medium review count. | Tempe is a city; high review count refers to review_count = 'High' | opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id; | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment'; | medium refers to number_of_compliments = 'Medium'; | 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 | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM'; | short reviews refer to tip_length = 'Short'; | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name; | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' |
Please list the cities of the Yelp_Businesses that have gotten a 5 in the Elitestar rating. | 5 in the Elitestar rating refers to stars = 5; | ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets')) | in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol' | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | "Shopping Centers" is the category_name; high review count refers to review_count = 'High' | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium'; | 5 star reviews refers to review_stars = 5; business No. refers to business_id; | ; |
How many Yelp_Businesses in Scottsdale have received positive comments in the Elitestar rating? | Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars; | 12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday' | high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1 | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0; | more appealing to users refers to MAX(review_count); | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | 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; | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name |
How many users who started yelping since 2012 have sent a high number of funny votes? | users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High'; | name of business refers to category_name; | more appealing to users refers to MAX(review_count); | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); | open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars); | DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false')); | good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'
| attribute_value = 'beer_and_wine' | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id |
List the categories of all active businesses that were not in Arizona. | active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name | "cool" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717 | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name; | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' | Yelp_Business no.1 refers to business_id = 1; open on refers to opening_time; Tuesdays refers to day_of_week = 'Tuesday' | category refers to category_name | medium length tip refers to tip_length = 'Medium'; | categories refers to category_name | attribute_value = 'beer_and_wine' | beer_and_wine refers to attribute_value = 'beer_and_wine'; | how long was the review refers to review_length; business number refers to business_id; user number refers to user_id; |
What are the categories that business number 15 belongs to? | business number refers to business_id; | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3 | active businesses refers to active = 'true'; Phoenix refers to city = 'Phoenix'; | highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id)))) | in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | in Chandelier refers to city = 'Chandelier'; percentage = divide(count(business_id where review_votes_funny = 'Low'), count(business_id)); business with low funny votes refers to review_votes_funny = 'Low' | 10 am refers to opening_time = '10AM'; 12 pm refers to closing_time = '12PM'; on Sunday refers to day_of_week = 'Sunday' | 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; |
Count the active businesses that has an attribute of Wi-Fi with medium review count. | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | the most reviews refer to MAX(user_id); | ; | business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday' | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; | automotive businesses refers to category_name = 'Automotive'; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Automotive'), COUNT(business_id)), 1.0); | with great experience refers to stars = 5 | uber number of fans refers to user_fans = 'uber'; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | close after 8PM refers to closing_time = '9PM' or closing_time = '10PM' closing_time = '11PM' closing_time = '12PM'; Mondays refers to day_of_week = 'Monday' |
In which categories does the only business located in the city of Arcadia appear? | categories refers to category_name | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | type of compliments refers to compliment_type; most number of funny type of compliments refers to MAX(COUNT(number of compliments = 'high' WHERE compliment_type = 'funny')); | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; | long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars); | businesses with long length tips refer to business_id where tip_length = 'Long'; | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id; | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | best elite refers to user_average_stars = 5; worse eliter refers to user_average_stars = 1: in 2013 refers to year_id = 2013; ratio = Divide(Count(user_id(user_average_stars = 5)), Count(user_id(user_average_stars = 1))) |
What is the average year for a user to be upgraded to elite user? | AVG(user_yelping_since_year) where user_id from Elite; | Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment'; | opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM'; | 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 | 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; | medium length of review refers to review_length = 'Medium' | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | 'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services' | state refers to city | attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%'; | Yelp_Business no.1 refers to business_id = 1; on weekends refers to day_of_week = 'Saturday' or day_of_week = 'Sunday'; average business time refers to DIVIDE(SUBTRACT(closing_time, opening_time), 2) |
What is the average year needed by a user with uber fans to become an elite user? | AVG(user_yelping_since_year) where user_fans = 'uber'; | in 2012 refers to actual_year = 2012; | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber'; | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | under the category "Food" refers to category_name = 'Food' | review of 4 star and above refers to stars > 4; DIVIDE(SUM(stars > 4), COUNT(business_id)) = 0.65; | uber number of fans refers to user_fans = 'uber'; |
For the Yelp businesses which received a "5" star review with "uber" number of votes for funny, which one is located in "Phoenix"? Give the business ID. | located in "Phoenix" refers to city = 'Phoenix'; received a "5" star review refers to review_stars = '5'; "uber" number of votes for funny refers to review_votes_funny = 'Uber' | closed business refers to active = 'false'; in Avondale refers to city = 'Avondale'; 'wonderful experience' rating refers to stars > 3; percentage = divide(count(business_id where stars > 3), count(business_id))*100% | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | the most reviews refer to MAX(user_id); | state refers to city | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' | bars refers to category_name = 'Bars'; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012 |
List out city name of businesses which have medium length of review. | medium length of review refers to review_length = 'Medium' | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | actively running refers to active = 'true'; | attribute name which start with "music" refers to attribute_name LIKE 'music%' | operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count) | open businesses refers to active = 'true'; long review refers to review_length = 'Long' | posted more than 10 reviews refers to count(Reviews.user_id) > 10 | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | average ratings of at least 4 refers to user_average_stars > = 4; no fans or followers refers to user_fans = 'None'; percentage = divide(count(user_id where user_average_stars > = 4 and user_fans = 'None'), sum(user_id where user_average_stars > = 4))*100% | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) |
How many active businesses are opened during late afternoon in the Phoenix city? List out the top 3 categories name for these businesses. | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix' | the most reviews refer to MAX(user_id); | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | AVG(user_yelping_since_year) where user_id from Elite; | under the category "Food" refers to category_name = 'Food' | user No. refers to user_id; | since year 2005 refers to year_id Between 2005 and 2014; increment percentage = Divide(Count(user_id(year_id < 2014)), Count (user_id(year_id = 2015))) * 100 | active business refers to active = 'true': 'Mesa' is the name of city; 'AZ' is the state; low review count refers to review_count = 'Low'; category refers to category_name | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | active businesses refers to active = 'true'; underrated refers to review_count = 'Low'; |
Find out which business is opened for 24/7 and list out what is the business attribute. | opened for 24/7 refers to Business_Hours WHERE opening_time = closing_time and business_id COUNT(day_id) = 7; business attribute refers to attribute_name | categories refers to category_name; Yelp_Business no.1 refers to business_id = 1 | 5 star reviews refers to review_stars = 5; business No. refers to business_id; | medium refers to number_of_compliments = 'Medium'; | uber number of fans refers to user_fans = 'uber'; | active business refers to active = 'true'; 'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars > avg(stars) * 60% | Arizona refers to state = 'AZ'; | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High' | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | 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; |
How many Yelp_Businesses in Arizona have a Elitestar rating of over 4? | Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4; | business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5)); | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; | AZ refers to state = 'AZ'; stars < 3; | closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id)); | average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name | high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1 | review of 4 star and above refers to stars > 4; DIVIDE(SUM(stars > 4), COUNT(business_id)) = 0.65; | "Good for Groups" and "Good for Dancing" are attribute_name; active business refers to active = true' | 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; |
How many short tips were left for the business with ID no.2? | short tip refers to tip_length = 'Short'; business category refers to category_name | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | "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 | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson'; | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | type of compliments refers to compliment_type; user No. refers to user_id; | Tempe is a city; high review count refers to review_count = 'High' | drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000; | shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM'; | active businesses refers to active = 'true'; underrated refers to review_count = 'Low'; |
Which business ID received the review of 4 star and above by 65% of user? Describe their active status and city. | review of 4 star and above refers to stars > 4; DIVIDE(SUM(stars > 4), COUNT(business_id)) = 0.65; | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | businesses with long length tips refer to business_id where tip_length = 'Long'; | category of businesses refers to category_name; stars ratings are 5 refers to stars = 5 | Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars; | days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7)); | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | joined yelp since 2004 refers to user_yelping_since_year = 2004; | 9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | 2006 and 2007 refers to BETWEEN 2006 AND 2007; greater number in elite user refers to count(user_id) |
List all the users with average star less than 3 stars in 2012 | average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012 | average review = Divide(Count(user_id), Count(business_id)) | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | type of compliments refers to compliment_type; user No. refers to user_id; | opening times of 7AM and closing times of 8PM refer to Business_Hours where opening_time = '7AM' and closing_time = '8PM'; active business refers to business_id where active = 'true'; | uber number of fans refers to user_fans = 'uber'; | attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%'; | "Good for Groups" and "Good for Dancing" are attribute_name; active business refers to active = true' | business number refers to business_id; | active businesses in Arizona refer to business_id where state = 'Arizona' and active = 'true'; work after 12PM refer to opening_time > '12PM'; | actively running refers to active = 'true'; |
Write down the number of running business with each review count in Cave Creek city. | 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'; | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3 | 2006 and 2007 refers to BETWEEN 2006 AND 2007; greater number in elite user refers to count(user_id) | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count) | Yelp_Business no.1 refers to business_id = 1; on weekends refers to day_of_week = 'Saturday' or day_of_week = 'Sunday'; average business time refers to DIVIDE(SUBTRACT(closing_time, opening_time), 2) | "Scottsdale" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; | active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler' | active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande' |
List out the user who is an elite user for consecutively 5 years or more and what is the user average star? How many likes does this user gets? | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | 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)) | active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler' | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true'; | average ratings of at least 4 refers to user_average_stars > = 4; no fans or followers refers to user_fans = 'None'; percentage = divide(count(user_id where user_average_stars > = 4 and user_fans = 'None'), sum(user_id where user_average_stars > = 4))*100% | businesses in "Pets" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100% | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'
|
How many businesses are with high review count? | high review count refers to review_count = 'High' | categories refers to category_name; in Arizona refers to state = 'AZ' | highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id)) | categories refers to category_name | 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; | 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 | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' | in Glendale refers to city = 'Glendale' | 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; | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012 |
List the business located in Mesa that have alcohol attribute. | in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol' | active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler' | with great experience refers to stars = 5 | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment'; | business number refers to business_id; business_id = 2; does not have refers to attribute_value = 'none'; | low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012 | user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3)) | type of compliments refers to compliment_type; user No. refers to user_id; | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6; |
Please provide the name of businesses with user id "16328". | name of business refers to category_name; | category of mexican refers to category_name = 'Mexican'; star rating below 4 refers to stars < 4 | percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100% | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | short reviews refer to tip_length = 'Short'; | 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)) | ; | Tempe is a city; high review count refers to review_count = 'High' | "Gilbert" is the name of city; highest star rating refers to Max(stars) | Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4; | "Tempe" is the name of city; long review refers to review_length = 'Long' |
How many users have "uber" number of fans? | uber number of fans refers to user_fans = 'uber'; | AVG(user_yelping_since_year) where user_id from Elite; | less than 5 low compliment refers to number_of_compliments < 5 | attribute name which start with "music" refers to attribute_name LIKE 'music%' | Arizona refers to state = 'AZ'; | the most reviews refer to MAX(user_id); | low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012 | "South Carolina" and "California" are both state; average review stars from users = Divide((Sum(review_stars(state = 'SC')) + Sum(review_stars(state = 'CA'))), Sum(stars)) | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | user No. refers to user_id; short tip refers to tip_length = 'short'; category refers to category_name; | opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; |
Which city is the business that got a "medium" length tip with "3" likes located in? | medium length tip refers to tip_length = 'Medium'; | active businesses refers to active = 'true'; in Tempe refers to city = 'Tempe'; with stars greater than the 70% of average age of star rating refers to stars > DIVIDE(sum(stars), COUNT(business_id)) * 70% | Yelp_Business no.1 refers to business_id = 1; on weekends refers to day_of_week = 'Saturday' or day_of_week = 'Sunday'; average business time refers to DIVIDE(SUBTRACT(closing_time, opening_time), 2) | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | categories refers to category_name | false | in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3 | state refers to city | business No. refers to business_id; have TV refers to attribute_name = 'Has TV'; | categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday' | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name |
List the categories of active businesses in Glendale, AZ. | active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state | Tempe is a city; high review count refers to review_count = 'High' | in Chandler refers to city = 'Chandler'; attribute refers to attribute_name | music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false' | since year 2012 refers to user_yelping_since_year = '2012' | businesses with long length tips refer to business_id where tip_length = 'Long'; | average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name | bring their own beer refers to attribute_name = 'BYOB' AND attribute_value = 'TRUE'; Phoenix refers to city = 'Phoenix'; percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix'), COUNT(business_id)), 1.0) | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert' | "Gilbert" is the name of city; high review count refers to review_count = 'High' |
For the Yelp business which had the most number of "short" tips, which category does it belong to? | short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name; | closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id)); | "Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id)) | located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ' | 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'; | do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High' | type of compliments refers to compliment_type; user No. refers to user_id; | average ratings of at least 4 refers to user_average_stars > = 4; no fans or followers refers to user_fans = 'None'; percentage = divide(count(user_id where user_average_stars > = 4 and user_fans = 'None'), sum(user_id where user_average_stars > = 4))*100% | can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium' | closed at 8PM refers to closing_time = '8PM'; |
How many business have been reviewed by user ID 3 and how long have this user been with Yelp? | year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year) | year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short')); | shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM'; | on Sunday refers to day_of_week = 'Sunday' | active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name | user No. refers to user_id; short tip refers to tip_length = 'short'; category refers to category_name; | categories refers to category_name; Yelp_Business no.1 refers to business_id = 1 | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | rating more than 2 refers to stars > 2; | 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'; |
What is the average number of review received by each business given that the user is an elite? | average review = Divide(Count(user_id), Count(business_id)) | business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday' | categories refers to category_name; in Arizona refers to state = 'AZ' | yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year)) | rating more than 2 refers to stars > 2; | in Glendale refers to city = 'Glendale' | AVG(user_yelping_since_year) where user_fans = 'uber'; | Yelp_Business no.1 refers to business_id = 1; open on refers to opening_time; Tuesdays refers to day_of_week = 'Tuesday' | low cool vote for user refers to user_votes_cool = 'Low'; low cool vote for review refers to review_votes_cool = 'Low' | short tip refers to tip_length = 'Short'; business category refers to category_name | categories refers to category_name |
Please list the business ID of the Yelp_Business with the highest Elitestar rating under the category "Food". | under the category "Food" refers to category_name = 'Food' | average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name | active business refers to active = 'true'; 'Pets' is the category_name | Yelp_Business no.1 refers to business_id = 1 | business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner' | ID number refers to attribute_id | elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes) | opened for 24/7 refers to Business_Hours WHERE opening_time = closing_time and business_id COUNT(day_id) = 7; business attribute refers to attribute_name | 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 | in Glendale refers to city = 'Glendale' | 9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city |
How many "bars" are there in the Yelp business? | bars refers to category_name = 'Bars'; | the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now | photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High' | highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id)))) | in Anthem refers to city = 'Anthem'; the category of "Food" refers to category_name = 'Food' | name of business refers to category_name; | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id)); | active business refers to active = 'true'; 'Pets' is the category_name | 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; | 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; |
How many stars on average does a Yelp_Business in Anthem get from a user review? | in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars) | still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM'; | Arizona refers to state = 'AZ'; still running refers to active = 'true'; | 12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday' | can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true' | attribute name which start with "music" refers to attribute_name LIKE 'music%' | business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday' | since year 2012 refers to user_yelping_since_year = '2012' | cool compliments refers to compliment_type = 'cool'; user number refers to user_id; | state refers to city | actively running refers to active = 'true'; |
List the active business ID and its stars of the businesses fall under the category of Pets. | active business refers to active = 'true'; 'Pets' is the category_name | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' | the most common type of compliments refers to MAX(COUNT(compliment_type)) | high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name | short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010; | closed at 8PM refers to closing_time = '8PM'; | year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short')); | 1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday' | 5 star reviews refers to review_stars = 5; business No. refers to business_id; | ID number refers to attribute_id | since year 2012 refers to user_yelping_since_year = '2012' |
Calculate the average review star from users in businesses located in South Carolina and California state. | "South Carolina" and "California" are both state; average review stars from users = Divide((Sum(review_stars(state = 'SC')) + Sum(review_stars(state = 'CA'))), Sum(stars)) | "Gilbert" is the name of city; highest star rating refers to Max(stars) | Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0); | percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0); | the most common type of compliments refers to MAX(COUNT(compliment_type)) | "Shopping Centers" is the category_name; high review count refers to review_count = 'High' | bars refers to category_name = 'Bars'; | long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium'; | active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters' | low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100 | business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.