set
dict |
---|
{
"query": "List all the coatches of the Oklahoma City Thunder",
"pos": [
"coach refers to coachID; Oklahoma City Thunder refers to name = 'Oklahoma City Thunder'"
],
"neg": [
"completed in the Western conference refers to conference = 'West'; in season 2006 refers to season_id = 2006; total of two blocks refers to blocks = 2; nickname refers to nameNick",
"team with winning rate less than 50% refers to Divide (won, Sum(won, lost)) < 0.5",
"more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name",
"highest home lost rate = Max(Divide(homelost, Sum(homeWon, homeLost)))",
"team refers to tmID; the highest point per minute refers to max(divide(points, minutes)); NBA refers to lgID = 'NBA'; from 1991 to 2000 refers to year BETWEEN 1991 AND 2000",
"full name refers to firstName, middleName, lastName; in the year 1997 refers to year = 1997; the most steals refers to max(steals)",
"minimum weight refers to Min(weight)",
"percentage of winning at the home = Divide(homeWon, won) * 100",
"served more than 2 NBA teams refers to count (tmID) > = 2; least number of game lost in post season refers to Min(post_losses)",
"the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75"
]
} |
{
"query": "What is the average BMI of an All-star player?",
"pos": [
"average BMI refers to AVG (Multiply(Divide(weight, Multiply(height, height)), 703))"
],
"neg": [
"in 1973 refers to year = 1973; player with highest field goal made refers to Max(Divide(fgMade, fgAttempted))",
"1970 to 1980 refers to year between 1970 and 1980; longest serving coach Max(Count(coachID)); team(s) he served refers to tmID",
"team with 90% games won refers to Divide (won, games) > 0.9",
"more than 2 different teams refers to count(tmID) > 2",
"percentage of winning at the home = Divide(homeWon, won) * 100",
"NBA refers to lgID = 'NBA'; didn't play in the playoffs refers to PostGP = 0; 2000 refers to year = 2000; the most winning rate refers to max(divide(won, add(won, lost)))",
"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",
"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%",
"name of the university refers to highSchool; NBA refers to lgID = 'NBA'; Finals MVP refers to award = 'Finals MVP'; in 1990 refers to year = 1990",
"greater than 75% lost refers to Divide(lost, games) > 0.75; team refers to tmID"
]
} |
{
"query": "Which team had the most same starting players througout the season? Give the full name of the team.",
"pos": [
"the same starting player refers to GP = GS; full name of the team refers to teams.name"
],
"neg": [
"NBA refers to lgID = 'NBA'; in 1996 season refers to season_id = 1996; more than 70% free throw rate refers to ft_made > = 0 AND ft_attempted > 0 AND divide(ft_made, ft_attempted) > 0.7",
"in 1937 refers to year = 1937; player got at least 500 points refers to Sum(points) > = 500",
"full name refers to teams.name",
"\"Rookie of the Year\" is the award; average weight = Divide (Sum(weight), Count(playerID))",
"from 1960 to 1970 refers to season_id between 1960 and 1970; still alive refers to deathDate = '0000-00-00'",
"\"Denver Nuggets\" is the name of team; since 1980 refers to year > 1980; tallest player = Max(height)",
"didn't play in playoffs refers to PostGP = 0; in the year 1997 refers to year = 1997; the most total rebounds refers to max(o_tmRebound)",
"in 1997 refers to year = 1997; the most rebounds refers to max(rebounds); team id refers to tmID",
"between 1975 and 1980 refers to year between 1975 and 1980; player abdulka01 refers to playerID = 'abdulka01'; play for LAL refers to tmID = 'LAL'",
"team name refers to teams.name; drafted from 'Seattle' refers to draftFrom = 'Seattle'; between year 1965 to 1970 refers to draftYear between 1965 and 1970"
]
} |
{
"query": "From which college was the player who won the most award in 1970.",
"pos": [
"college refers to highSchool; won the most award refers to max(count(award)); in 1970 refers to year = 1970"
],
"neg": [
"the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75",
"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",
"highest home lost rate = Max(Divide(homelost, Sum(homeWon, homeLost)))",
"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%",
"in 1973 refers to year = 1973; player with highest field goal made refers to Max(Divide(fgMade, fgAttempted))",
"from 1937 to 1940 refers to year between 1937 and 1940; player with highest point refers to Max(points)",
"team with winning rate less than 50% refers to Divide (won, Sum(won, lost)) < 0.5",
"the Most improved Player refers to award = 'Most Improved Player'; from 1985-1990 refers to year between 1985 and 1990; country is USA refers to birthCountry = 'USA'",
"born in Winter Haven refers to birthCity = 'Winter Haven'; during the 1980s in All-Stars refers to season_id = 1980; played in 12 minutes per season refers to minutes = 12",
"in 2010 refers to year = 2010; attended high school in Chicago refers to college = 'Chicago'"
]
} |
{
"query": "In which league did the player who weighs 40% less than the heaviest player and whose height is 80 inches play?",
"pos": [
"weigh 40% less than the heaviest player refers to weight = Multiply(Max (weight), 0.6); league refers to lgID"
],
"neg": [
"born after 1950 refers to birthDate > = '1950-01-01'; offence rebound rate more than 30% refers to Divide (oRebounds, rebounds) > 0.3",
"completed in the Western conference refers to conference = 'West'; in season 2006 refers to season_id = 2006; total of two blocks refers to blocks = 2; nickname refers to nameNick",
"year 1990-1995 refers to year between 1990 and 1995; 'adelmri01' is the coachID; offense point refers to o_fgm",
"minimum weight refers to Min(weight)",
"average height refers to avg(height)",
"more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name",
"coach refers to coachID; Oklahoma City Thunder refers to name = 'Oklahoma City Thunder'",
"1970 to 1980 refers to year between 1970 and 1980; longest serving coach Max(Count(coachID)); team(s) he served refers to tmID",
"Most Valuable Player award refers to award = 'Most Valuable Player'; from 1969 to 1975 refers to year between 1969 and 1975",
"player refers to playerID; the most game presentations refers to max(GP); in 2020 refers to year = 2020; NBA season refers to lgID = 'NBA'"
]
} |
{
"query": "What is the full name of the team with the fastest growth in winning rate in the 'ABA' league from 1972 to 1973?",
"pos": [
"\"ABA\" is the lgID; from 1972 to 1973 refers to year = 1972 and year = 1973; team with the fastest growth in winning rate = Max(Subtract(Divide(won where year = 1973, Sum(won, lost)),Divide(won where year = 1972, Sum(won, lost))))"
],
"neg": [
"\"NBL\" is the lgID; 'Spencer' is the birthCity",
"Most Valuable Player award refers to award = 'Most Valuable Player'; from 1969 to 1975 refers to year between 1969 and 1975",
"in year 2000 refers to year = 2000; percentage = divide(sum(o_rebounds), sum(rebounds)) * 100%",
"NBA refers to lgID = 'NBA'; in 1996 season refers to season_id = 1996; more than 70% free throw rate refers to ft_made > = 0 AND ft_attempted > 0 AND divide(ft_made, ft_attempted) > 0.7",
"in 1997 refers to year = 1997; the most rebounds refers to max(rebounds); team id refers to tmID",
"most assist refers to Max(assists); in 1985 All Star season refers to season_id = 1985",
"full name refers to firstName, middleName, lastName; in 1973 refers to year = 1973; not born in USA refers to birthCountry <> 'USA'",
"the scoring champion refers to max(won); 2001 refers to year = 2001; NBA refers to lgID = 'NBA'",
"average height refers to avg(height)",
"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)"
]
} |
{
"query": "What is the first and last name of the player with the highest field goal made rate in 1973?",
"pos": [
"in 1973 refers to year = 1973; player with highest field goal made refers to Max(Divide(fgMade, fgAttempted))"
],
"neg": [
"\"All-Defensive First Team\" is the award; ' NY' is the birthState; 1980 to 2000 refers to year between 1980 and 2000; percentage = Divide (Count(playerID where birthState = 'NY'), Count(playerID)) * 100",
"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",
"in 1998 refers to year = 1998; 1st round refers to draftRound = 1; 12th pick refers to draftSelection = 12; home win refers to homeWon",
"completed in the Western conference refers to conference = 'West'; in season 2006 refers to season_id = 2006; total of two blocks refers to blocks = 2; nickname refers to nameNick",
"full name refers to firstName, middleName, lastName; age = subtract(2003, year(birthDate)); won the \"Finals MVP\" refers to award = 'Finals MVP'; in 2003 refers to year = 2003",
"higher than 75 inch refers to height > 75",
"\"Rookie of the Year\" is the award; average weight = Divide (Sum(weight), Count(playerID))",
"name of the university refers to highSchool; NBA refers to lgID = 'NBA'; Finals MVP refers to award = 'Finals MVP'; in 1990 refers to year = 1990",
"\"AFS\" is the tmID; tallest height refers to Max(height)",
"most assist refers to Max(assists); in 1985 All Star season refers to season_id = 1985"
]
} |
{
"query": "Name the youngest player who ever won \"Rookie of the Year\".",
"pos": [
"player name refers to playerID; the youngest refers to max(birthDate); won \"Rookie of the Year\" refers to award = 'Rookie of the Year'"
],
"neg": [
"BMI = Multiply(Divide(weight, Multiply(height, height)), 703)",
"NBA refers to lgID = 'NBA'; in 1996 season refers to season_id = 1996; more than 70% free throw rate refers to ft_made > = 0 AND ft_attempted > 0 AND divide(ft_made, ft_attempted) > 0.7",
"born after 1950 refers to birthDate > = '1950-01-01'; offence rebound rate more than 30% refers to Divide (oRebounds, rebounds) > 0.3",
"Auburn University refers to college = 'Auburn'; won an \"All-Defensive Second Team\" award refers to award = 'All-Defensive Second Team'; percentage = divide(count(playerID where award = 'All-Defensive Second Team'), count(playerID)) where college = 'Auburn' * 100%",
"high school in Chicago refers to hsCity = 'Chicago'; belong to the west conference refers to divID = 'WE'",
"full name refers to firstName, middleName, lastName; in 1973 refers to year = 1973; not born in USA refers to birthCountry <> 'USA'",
"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)",
"\"BLB\" is the tmID",
"average height refers to avg(height)",
"between 1975 and 1980 refers to year between 1975 and 1980; player abdulka01 refers to playerID = 'abdulka01'; play for LAL refers to tmID = 'LAL'"
]
} |
{
"query": "How many players received Most Valuable Player award from 1969 to 1975?",
"pos": [
"Most Valuable Player award refers to award = 'Most Valuable Player'; from 1969 to 1975 refers to year between 1969 and 1975"
],
"neg": [
"minimum weight refers to Min(weight)",
"shortest player refers to Min(height); black players refers to race = 'B'",
"full name refers to teams.name",
"champion refers to round = 'F'; team name refers to teams.name; from year 1950 to 1960 refers to year between 1950 and 1960",
"born after 1950 refers to birthDate > = '1950-01-01'; offence rebound rate more than 30% refers to Divide (oRebounds, rebounds) > 0.3",
"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%",
"home won than home lost more than 80% refers to Divide(Subtract(homeWon, homeLost), games) > 0.8; offense point refers to o_fgm",
"team refers to tmID; the highest point per minute refers to max(divide(points, minutes)); NBA refers to lgID = 'NBA'; from 1991 to 2000 refers to year BETWEEN 1991 AND 2000",
"average height refers to avg(height)",
"the most rebounds refers to max(rebounds)"
]
} |
{
"query": "Please list down the last name of players from \"BLB\" team.",
"pos": [
"\"BLB\" is the tmID"
],
"neg": [
"1973 season refers to season_id = 1973; black refers to race = 'B'",
"BMI = Multiply(Divide(weight, Multiply(height, height)), 703)",
"in year 2000 refers to year = 2000; percentage = divide(sum(o_rebounds), sum(rebounds)) * 100%",
"home won than home lost more than 80% refers to Divide(Subtract(homeWon, homeLost), games) > 0.8; offense point refers to o_fgm",
"the most turnovers refers to max(turnovers); missed the playoffs refers to PostGP = 0; in year 1988 refers to year = 1988",
"between 1975 and 1980 refers to year between 1975 and 1980; player abdulka01 refers to playerID = 'abdulka01'; play for LAL refers to tmID = 'LAL'",
"2001 refers to year = 2001; rebounds leader refers to max(rebounds); birthday refers to birthDate",
"minimum weight refers to Min(weight)",
"champion refers to round = 'F'; team name refers to teams.name; from year 1950 to 1960 refers to year between 1950 and 1960",
"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"
]
} |
{
"query": "Which coach has the most 'won' than 'lost' in year '1988'?",
"pos": [
"in year '1988' refers to year = 1988; the most 'won' than 'lost' refers to max(subtract(won, lost))"
],
"neg": [
"between 1951 and 1953 refers to season_id; field goal refers to fg_made",
"1970 to 1980 refers to year between 1970 and 1980; longest serving coach Max(Count(coachID)); team(s) he served refers to tmID",
"Eastern conference refers to conference = 'East'; no more than 5 minutes refers to minutes < 5",
"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",
"the most rebounds refers to max(rebounds)",
"player refers to playerID; the most game presentations refers to max(GP); in 2020 refers to year = 2020; NBA season refers to lgID = 'NBA'",
"percentage of winning at the home = Divide(homeWon, won) * 100",
"\"ABA\" is the lgID; from 1972 to 1973 refers to year = 1972 and year = 1973; team with the fastest growth in winning rate = Max(Subtract(Divide(won where year = 1973, Sum(won, lost)),Divide(won where year = 1972, Sum(won, lost))))",
"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%",
"in 2010 refers to year = 2010; attended high school in Chicago refers to college = 'Chicago'"
]
} |
{
"query": "How many All Star players who played in the 1973 season were black?",
"pos": [
"1973 season refers to season_id = 1973; black refers to race = 'B'"
],
"neg": [
"the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75",
"\"ABA Coach of the Year\" is the award; highest number of won games refers to Max(Count(won))",
"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",
"coach refers to coachID; Oklahoma City Thunder refers to name = 'Oklahoma City Thunder'",
"average BMI refers to AVG (Multiply(Divide(weight, Multiply(height, height)), 703))",
"born in Winter Haven refers to birthCity = 'Winter Haven'; during the 1980s in All-Stars refers to season_id = 1980; played in 12 minutes per season refers to minutes = 12",
"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%",
"full name refers to firstName, middleName, lastName; in the year 1997 refers to year = 1997; the most steals refers to max(steals)",
"\"Chicago Bull\" is the name of team; during the year 1981 refers to year = 1981; 'NBA Coach of the Year' is the award; in the 1970s refers to year between 1970 to 1979",
"name of the university refers to highSchool; NBA refers to lgID = 'NBA'; Finals MVP refers to award = 'Finals MVP'; in 1990 refers to year = 1990"
]
} |
{
"query": "In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids.",
"pos": [
"in 1997 refers to year = 1997; the most rebounds refers to max(rebounds); team id refers to tmID"
],
"neg": [
"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 year 2000 refers to year = 2000; percentage = divide(sum(o_rebounds), sum(rebounds)) * 100%",
"in 1973 refers to year = 1973; player with highest field goal made refers to Max(Divide(fgMade, fgAttempted))",
"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",
"in 1937 refers to year = 1937; player got at least 500 points refers to Sum(points) > = 500",
"1973 season refers to season_id = 1973; black refers to race = 'B'",
"between 1951 and 1953 refers to season_id; field goal refers to fg_made",
"champion refers to round = 'F'; team name refers to teams.name; from year 1950 to 1960 refers to year between 1950 and 1960",
"born after 1950 refers to birthDate > = '1950-01-01'; offence rebound rate more than 30% refers to Divide (oRebounds, rebounds) > 0.3"
]
} |
{
"query": "Which coach of the Chicago Bulls during the year 1981 won the NBA Coach of the Year award in the 1970s?",
"pos": [
"\"Chicago Bull\" is the name of team; during the year 1981 refers to year = 1981; 'NBA Coach of the Year' is the award; in the 1970s refers to year between 1970 to 1979"
],
"neg": [
"the most rebounds refers to max(rebounds)",
"team refers to tmID; quarterfinal refers to round = 'QF'; score 3,513 defensive points refers to d_pts > = 3513",
"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%",
"in 1990 refers to season_id = 1990; 50% or less of oRebounds than dRebounds refers to o_rebounds < = multiply(d_rebounds, 0.5)",
"\"ABA Coach of the Year\" is the award; highest number of won games refers to Max(Count(won))",
"more than 50 games won refers to won > 50",
"between 1951 and 1953 refers to season_id; field goal refers to fg_made",
"in 1937 refers to year = 1937; player got at least 500 points refers to Sum(points) > = 500",
"team with winning rate less than 50% refers to Divide (won, Sum(won, lost)) < 0.5",
"more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name"
]
} |
{
"query": "In what year did the only team to beat the Houston in the final round of postseason series games earn its lowest ranking?",
"pos": [
"beat the Huston refers to tmIDLoser = 'HSM'; in final round of post season refers to round = 'DSF'"
],
"neg": [
"year 1990-1995 refers to year between 1990 and 1995; 'adelmri01' is the coachID; offense point refers to o_fgm",
"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)",
"BMI = Multiply(Divide(weight, Multiply(height, height)), 703)",
"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",
"full name refers to teams.name",
"between 1975 and 1980 refers to year between 1975 and 1980; player abdulka01 refers to playerID = 'abdulka01'; play for LAL refers to tmID = 'LAL'",
"served more than 2 NBA teams refers to count (tmID) > = 2; least number of game lost in post season refers to Min(post_losses)",
"most assist refers to Max(assists); in 1985 All Star season refers to season_id = 1985",
"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)",
"\"AFS\" is the tmID; tallest height refers to Max(height)"
]
} |
{
"query": "Which player from \"AFS\" team has the tallest height?",
"pos": [
"\"AFS\" is the tmID; tallest height refers to Max(height)"
],
"neg": [
"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"
]
} |
{
"query": "Name the team in which the coach won the title 'NBA Coach of the Year' in 2010.",
"pos": [
"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"
],
"neg": [
"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"
]
} |
{
"query": "Which team(s) has greater than 75% lost among all the games played.",
"pos": [
"greater than 75% lost refers to Divide(lost, games) > 0.75; team refers to tmID"
],
"neg": [
"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))"
]
} |
{
"query": "How many field goals did George Mikan make overall between 1951 and 1953?",
"pos": [
"between 1951 and 1953 refers to season_id; field goal refers to fg_made"
],
"neg": [
"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"
]
} |
{
"query": "Find out which business ID are opened all the time.",
"pos": [
"opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time;"
],
"neg": [
"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'"
]
} |
{
"query": "Among the businesses in Chandler, list the attribute of the business with a low review count.",
"pos": [
"in Chandler refers to city = 'Chandler'; attribute refers to attribute_name"
],
"neg": [
"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'"
]
} |
{
"query": "List down the category of businesses whose stars ratings are 5.",
"pos": [
"category of businesses refers to category_name; stars ratings are 5 refers to stars = 5"
],
"neg": [
"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;"
]
} |
{
"query": "Calculate difference between business that have the highest number of reviews and business that have the lowest number of reviews.",
"pos": [
"highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id))))"
],
"neg": [
"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%"
]
} |
{
"query": "How many stars on average does user no.3 give to Yelp_Business in Arizona?",
"pos": [
"user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3))"
],
"neg": [
"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%"
]
} |
{
"query": "How many Yelp_Business in Anthem are under the category of \"Food\"?",
"pos": [
"in Anthem refers to city = 'Anthem'; the category of \"Food\" refers to category_name = 'Food'"
],
"neg": [
"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';"
]
} |
{
"query": "In businesses with a category of mexican, how many of them has a star rating below 4?",
"pos": [
"category of mexican refers to category_name = 'Mexican'; star rating below 4 refers to stars < 4"
],
"neg": [
"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';"
]
} |
{
"query": "What is the average business time for Yelp_Business no.1 on weekends?",
"pos": [
"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)"
],
"neg": [
"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'"
]
} |
{
"query": "What business category is the Yelp business which got the most 5 star reviews in?",
"pos": [
"business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5));"
],
"neg": [
"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"
]
} |
{
"query": "Calculate the difference between running business in Glendale City and Mesa City.",
"pos": [
"running business refers to business where active = 'true';"
],
"neg": [
"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)"
]
} |
{
"query": "Find out which hotel and travel business having the most review? Calculate the standard deviation of the review star for this business.",
"pos": [
"\"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))"
],
"neg": [
"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'"
]
} |
{
"query": "Count the active businesses that has an attribute of caters with low review count.",
"pos": [
"active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters'"
],
"neg": [
"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';"
]
} |
{
"query": "Among the businesses with a category of Local Services, what is the percentage of the business with less than 3 stars?",
"pos": [
"\"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"
],
"neg": [
"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))"
]
} |
{
"query": "Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday.",
"pos": [
"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;"
],
"neg": [
"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;"
]
} |
{
"query": "How many users with a long tip and 2 likes for their tip have a high number of fans?",
"pos": [
"long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High'"
],
"neg": [
"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;"
]
} |
{
"query": "How many 2 stars rated business located in Phoenix, Arizona?",
"pos": [
"located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ'"
],
"neg": [
"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'));"
]
} |
{
"query": "What is the yearly average review done by user ID 3?",
"pos": [
"yearly average review = Divide( Count(business_id), Subtract('%Y'(CURRENT_TIME), user_yelping_since_year))"
],
"neg": [
"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"
]
} |
{
"query": "What city does the business have a business hour from 10 am to 12 pm on Sunday?",
"pos": [
"10 am refers to opening_time = '10AM'; 12 pm refers to closing_time = '12PM'; on Sunday refers to day_of_week = 'Sunday'"
],
"neg": [
"types of music refers to attribute_name LIKE '%music%' WHERE attribute_value = 'true'; business No. refers to business_id;\n",
"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;"
]
} |
{
"query": "List the active business ID and its stars of the businesses fall under the category of Fashion.",
"pos": [
"active business refers to active = 'true'; category of Fashion refers to category = 'Fashion'"
],
"neg": [
"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"
]
} |
{
"query": "How many users have joined Yelp since the year 2012?",
"pos": [
"since year 2012 refers to user_yelping_since_year = '2012'"
],
"neg": [
"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;"
]
} |
{
"query": "Sum up the number of business with \"ambience_romantic\" attribute.",
"pos": [
"\"ambience_romantic\" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true'"
],
"neg": [
"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';"
]
} |
{
"query": "User No.\"63469\" has got \"1\" like for a tip to the Yelp business, which city is that business located in?",
"pos": [
"user No. refers to user_id;"
],
"neg": [
"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));"
]
} |
{
"query": "Which city has more Yelp_Business that's more appealing to users, Scottsdale or Anthem?",
"pos": [
"more appealing to users refers to MAX(review_count);"
],
"neg": [
"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;"
]
} |
{
"query": "Please list all the categories of the Yelp_Business in Arizona.",
"pos": [
"categories refers to category_name; in Arizona refers to state = 'AZ'"
],
"neg": [
"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"
]
} |
{
"query": "Among the Yelp_Businesses which are still running, how many of them fall under the category of \"Food\"?",
"pos": [
"are still running refers to active = 'true'; the category of \"Food\" refers to category_name = 'Food'"
],
"neg": [
"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'"
]
} |
{
"query": "Among the Yelp_Business in Arizona, how many of them closes at 12PM on Sundays?",
"pos": [
"in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'"
],
"neg": [
"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'\n",
"opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';"
]
} |
{
"query": "Find the Yelp user with the average 5-star rating of all reviews who has been yelping the longest.",
"pos": [
"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)"
],
"neg": [
"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))"
]
} |
{
"query": "Calculate the yearly average user who started using Yelp from the year of 2005 to 2014.",
"pos": [
"avg(user_id) where user_yelping_since_year BETWEEN '2005' AND '2014';"
],
"neg": [
"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'\n"
]
} |
{
"query": "How many \"cute\" type of compliments does user No. 57400 get?",
"pos": [
"type of compliments refers to compliment_type; user No. refers to user_id;"
],
"neg": [
"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';"
]
} |
{
"query": "How many active businesses from Casa Grande are registered in the database?",
"pos": [
"active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande'"
],
"neg": [
"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))"
]
} |
{
"query": "Provide business ids with opening hours 10AM on Saturday.",
"pos": [
"opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6;"
],
"neg": [
"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));"
]
} |
{
"query": "What is the ratio of good to bad business star for a businesses that are opened all the time?",
"pos": [
"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));"
],
"neg": [
"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"
]
} |
{
"query": "How many businesses in Arizona having an average review less than 3 stars?",
"pos": [
"businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0;"
],
"neg": [
"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'"
]
} |
{
"query": "How many active businesses of city are underrated?",
"pos": [
"active businesses refers to active = 'true'; underrated refers to review_count = 'Low';"
],
"neg": [
"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);"
]
} |
{
"query": "Indicate the business id and days which are opened from 8AM to 6PM.",
"pos": [
"opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id;"
],
"neg": [
"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"
]
} |
{
"query": "Which business ID has the most reviews?",
"pos": [
"the most reviews refer to MAX(user_id);"
],
"neg": [
"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'"
]
} |
{
"query": "State the state of businesses which have closing time at 12AM.",
"pos": [
"state refers to city"
],
"neg": [
"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;"
]
} |
{
"query": "How many businesses are there in Phoenix city? Find the percentage of businesses in Phoenix city in the total city.",
"pos": [
"percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0);"
],
"neg": [
"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;"
]
} |
{
"query": "How long does business number 12 in Scottsdale stay open on day number 3?",
"pos": [
"business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id;"
],
"neg": [
"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;"
]
} |
{
"query": "Who has got the most number of \"funny\" type of compliments? Give the user ID.",
"pos": [
"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'));"
],
"neg": [
"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;"
]
} |
{
"query": "Among the long reviews made by user ID 3, how many of them have received a medium number of useful votes?",
"pos": [
"long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = 'medium';"
],
"neg": [
"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'"
]
} |
{
"query": "How many \"5\" star reviews does the Yelp business No. \"10682\" get?",
"pos": [
"5 star reviews refers to review_stars = 5; business No. refers to business_id;"
],
"neg": [
"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%"
]
} |
{
"query": "How many Yelp_Business in Arizona has user no. 3 reviewed?",
"pos": [
"in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3"
],
"neg": [
"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"
]
} |
{
"query": "How many users manage to get uber votes for all of the review category? Find out what are the user average star.",
"pos": [
"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';"
],
"neg": [
"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"
]
} |
{
"query": "How many businesses are actively running in Gilbert City?",
"pos": [
"actively running refers to active = 'true';"
],
"neg": [
"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"
]
} |
{
"query": "In which year did the user who has given the most number of \"short\" tips join the Yelp?",
"pos": [
"year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short'));"
],
"neg": [
"good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'\n",
"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"
]
} |
{
"query": "Among all closed businesses in Avondale, AZ what percent have obtained a 'wonderful experience' rating of the business.",
"pos": [
"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%"
],
"neg": [
"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'"
]
} |
{
"query": "Sum up the likes get by short reviews on businesses located in City Goodyear.",
"pos": [
"short reviews refer to tip_length = 'Short';"
],
"neg": [
"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));"
]
} |
{
"query": "Is the Yelp business No. 14033 good for supper?",
"pos": [
"business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner'"
],
"neg": [
"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;"
]
} |
{
"query": "How many user's compliment in photo has medium in number?",
"pos": [
"user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium'"
],
"neg": [
"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';"
]
} |
{
"query": "How long was the review for business number 2 that user number 612 wrote?",
"pos": [
"how long was the review refers to review_length; business number refers to business_id; user number refers to user_id;"
],
"neg": [
"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);"
]
} |
{
"query": "List out which business category that are most likely to have average good review in Arizona?",
"pos": [
"average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name"
],
"neg": [
"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'\n",
"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)"
]
} |
{
"query": "How many \"cool\" type compliments does user No. 41717 get?",
"pos": [
"\"cool\" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717"
],
"neg": [
"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);"
]
} |
{
"query": "How many businesses in Glendale are reviewed by user with the ID of 20241?",
"pos": [
"in Glendale refers to city = 'Glendale'"
],
"neg": [
"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);"
]
} |
{
"query": "Which businesses with the category name Accessories have opening hours before 7AM?",
"pos": [
"opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id;"
],
"neg": [
"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'"
]
} |
{
"query": "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.",
"pos": [
"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%"
],
"neg": [
"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'"
]
} |
{
"query": "List at least 5 users that has received less than 5 low compliments from\nother users.",
"pos": [
"less than 5 low compliment refers to number_of_compliments < 5"
],
"neg": [
"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))"
]
} |
{
"query": "How many Yelp businesses are there in 'AZ' with less than \"3\" stars?",
"pos": [
"AZ refers to state = 'AZ'; stars < 3;"
],
"neg": [
"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'"
]
} |
{
"query": "Among the working days from Monday to Saturday, which businesses with the category names work the most days?",
"pos": [
"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));"
],
"neg": [
"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'"
]
} |
{
"query": "Indicate the opening hours of businesses are with category in fashion.",
"pos": [
"opening hours refers to opening_time; category refers to category_name;"
],
"neg": [
"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)"
]
} |
{
"query": "What is the total number of active business in AZ with a high review count?",
"pos": [
"active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High'"
],
"neg": [
"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'\n"
]
} |
{
"query": "What percentage more for the \"Women's Clothing\" Yelp businesses to \"Men's Clothing\"?",
"pos": [
"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);"
],
"neg": [
"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"
]
} |
{
"query": "Among the businesses in Tempe, list the attribute of the business with a medium review count.",
"pos": [
"Tempe is a city; high review count refers to review_count = 'High'"
],
"neg": [
"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'"
]
} |
{
"query": "Please list the cities of the Yelp_Businesses that have gotten a 5 in the Elitestar rating.",
"pos": [
"5 in the Elitestar rating refers to stars = 5;"
],
"neg": [
"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;",
";"
]
} |
{
"query": "How many Yelp_Businesses in Scottsdale have received positive comments in the Elitestar rating?",
"pos": [
"Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars;"
],
"neg": [
"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"
]
} |
{
"query": "How many users who started yelping since 2012 have sent a high number of funny votes?",
"pos": [
"users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High';"
],
"neg": [
"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'\n",
"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"
]
} |
{
"query": "List the categories of all active businesses that were not in Arizona.",
"pos": [
"active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name"
],
"neg": [
"\"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;"
]
} |
{
"query": "What are the categories that business number 15 belongs to?",
"pos": [
"business number refers to business_id;"
],
"neg": [
"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;"
]
} |
{
"query": "Count the active businesses that has an attribute of Wi-Fi with medium review count.",
"pos": [
"active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium'"
],
"neg": [
"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'"
]
} |
{
"query": "In which categories does the only business located in the city of Arcadia appear?",
"pos": [
"categories refers to category_name"
],
"neg": [
"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)))"
]
} |
{
"query": "What is the average year for a user to be upgraded to elite user?",
"pos": [
"AVG(user_yelping_since_year) where user_id from Elite;"
],
"neg": [
"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)"
]
} |
{
"query": "What is the average year needed by a user with uber fans to become an elite user?",
"pos": [
"AVG(user_yelping_since_year) where user_fans = 'uber';"
],
"neg": [
"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';"
]
} |
{
"query": "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.",
"pos": [
"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'"
],
"neg": [
"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"
]
} |
{
"query": "List out city name of businesses which have medium length of review.",
"pos": [
"medium length of review refers to review_length = 'Medium'"
],
"neg": [
"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)"
]
} |
{
"query": "How many active businesses are opened during late afternoon in the Phoenix city? List out the top 3 categories name for these businesses.",
"pos": [
"opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';"
],
"neg": [
"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';"
]
} |
{
"query": "Find out which business is opened for 24/7 and list out what is the business attribute.",
"pos": [
"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"
],
"neg": [
"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;"
]
} |
{
"query": "How many Yelp_Businesses in Arizona have a Elitestar rating of over 4?",
"pos": [
"Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4;"
],
"neg": [
"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;"
]
} |
{
"query": "How many short tips were left for the business with ID no.2?",
"pos": [
"short tip refers to tip_length = 'Short'; business category refers to category_name"
],
"neg": [
"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';"
]
} |
{
"query": "Which business ID received the review of 4 star and above by 65% of user? Describe their active status and city.",
"pos": [
"review of 4 star and above refers to stars > 4; DIVIDE(SUM(stars > 4), COUNT(business_id)) = 0.65;"
],
"neg": [
"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)"
]
} |
{
"query": "List all the users with average star less than 3 stars in 2012",
"pos": [
"average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012"
],
"neg": [
"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';"
]
} |
{
"query": "Write down the number of running business with each review count in Cave Creek city.",
"pos": [
"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';"
],
"neg": [
"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'"
]
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.