set
dict
{ "query": "List the closing time and day of week of active businesses in Tempe with stars greater than the 70% of average age of star rating.", "pos": [ "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%" ], "neg": [ "more appealing to users refers to MAX(review_count);", "businesses with long length tips refer to business_id where tip_length = 'Long';", "ID refers to business_id; category of \"Diagnostic Imaging\" refers to category_name = 'Diagnostic Imaging';", "most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert'", "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'", "bars refers to category_name = 'Bars';", "photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High'", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "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'));" ] }
{ "query": "State the number of actively running Yelp businesses in \"Tolleson\".", "pos": [ "actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson';" ], "neg": [ "\"cool\" type compliments refers to compliment_type = 'cool'; user No. 41717 refers to user_id = 41717", "business number refers to business_id;", "business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5));", "businesses with long length tips refer to business_id where tip_length = 'Long';", "year has the most elite users refers to year_id with MAX(user_id);", "how long was the review refers to review_length; business number refers to business_id; user number refers to user_id;", "in Chandler refers to city = 'Chandler'; attribute refers to attribute_name", "opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time;", "open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars);", "state refers to city" ] }
{ "query": "What is the closing and opening time of businesses located at Gilbert with highest star rating?", "pos": [ "\"Gilbert\" is the name of city; highest star rating refers to Max(stars)" ], "neg": [ "started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High'", "\"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", "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", ";", "in 2012 refers to actual_year = 2012;", "avg(user_id) where user_yelping_since_year BETWEEN '2005' AND '2014';", "opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';", "joined yelp since 2004 refers to user_yelping_since_year = 2004;", "high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year)", "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" ] }
{ "query": "For businesses with long length reviews, which state are they located?", "pos": [ "businesses with long length tips refer to business_id where tip_length = 'Long';" ], "neg": [ "opening hours refers to opening_time; category refers to category_name;", "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;", "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'", "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'", "active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters'", "open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'; rating refers to stars; average rating = AVG(stars);", "2006 and 2007 refers to BETWEEN 2006 AND 2007; greater number in elite user refers to count(user_id)", "short reviews refer to tip_length = 'Short';", "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'" ] }
{ "query": "List the user ID, business ID with review length of the business which received the most likes in tips.", "pos": [ "business which received the most likes refers to business_id where MAX(likes);" ], "neg": [ "open businesses refers to active = 'true'; long review refers to review_length = 'Long'", "in Glendale refers to city = 'Glendale'", "businesses with long length tips refer to business_id where tip_length = 'Long';", "good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'\n", "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))", "closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id));", "\"Hotel & Travel\" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id))", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber';", "became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id" ] }
{ "query": "For the only Yelp business in \"Yuma\" city, how many \"medium\" reviews did it get?", "pos": [ "medium reviews refers to review_length = 'Medium';" ], "neg": [ "Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4;", "shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM';", "Yelp_Business no.1 refers to business_id = 1", "opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM';", "active businesses refers to active = 'true'; underrated refers to review_count = 'Low';", "\"Gilbert\" is the name of city; high review count refers to review_count = 'High'", "user No. refers to user_id;", "short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix'", "high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name", "in Casa Grande refers to city = 'Casa Grande'" ] }
{ "query": "What is the ratio between business in shopping category and business in pets category?", "pos": [ "ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets'))" ], "neg": [ "less than 5 low compliment refers to number_of_compliments < 5", "music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false'", "in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3", "AZ refers to state = 'AZ'; stars < 3;", "\"Scottsdale\" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name", "opened for 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'", "automotive businesses refers to category_name = 'Automotive'; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Automotive'), 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'", "active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium'", "actively running refers to active = 'true';" ] }
{ "query": "What is the closing time of business id 4 on Sunday?", "pos": [ "on Sunday refers to day_of_week = 'Sunday'" ], "neg": [ "running business refers to business where active = 'true';", "low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100", "is medium refers to user_fans = 'Medium'; high compliments refers to number_of_compliments = 'High'", "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 most common type of compliments refers to MAX(COUNT(compliment_type))", "categories refers to category_name", "opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id;", "under the category \"Food\" refers to category_name = 'Food'", "joined yelp since 2004 refers to user_yelping_since_year = 2004;", "AVG(user_yelping_since_year) where user_id from Elite;" ] }
{ "query": "Count the active businesses that has an attribute of BYOB with high review count.", "pos": [ "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'" ], "neg": [ "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)", "opened for 24/7 refers to Business_Hours WHERE opening_time = closing_time and business_id COUNT(day_id) = 7; business attribute refers to attribute_name", "categories refers to category_name; in Arizona refers to state = 'AZ'", "\"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))", "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", "located in \"Phoenix\" refers to city = 'Phoenix'; received a \"5\" star review refers to review_stars = '5'; \"uber\" number of votes for funny refers to review_votes_funny = 'Uber'", "closed at 8PM refers to closing_time = '8PM';", "active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High'", "highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id))", "user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute';" ] }
{ "query": "How many photos type compliment given from users with high cool votes?", "pos": [ "photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High'" ], "neg": [ "ID number refers to attribute_id", "businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber';", "user No. refers to user_id;", "\"Gilbert\" is the name of city; high review count refers to review_count = 'High'", "user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute';", "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));", "business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'", "how long was the review refers to review_length; business number refers to business_id; user number refers to user_id;", "business number refers to business_id;", "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" ] }
{ "query": "How many businesses have the category named food? List those businesses and find the percentage of businesses with less than 2 stars.", "pos": [ "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;" ], "neg": [ "year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars;", "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'", "'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services'", "in Glendale refers to city = 'Glendale'", "medium refers to number_of_compliments = 'Medium';", "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'", "high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name", "ID refers to business_id; category of \"Diagnostic Imaging\" refers to category_name = 'Diagnostic Imaging';", "Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino'));", "business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5));" ] }
{ "query": "How many Yelp_Businesses do not provide alcohol?", "pos": [ "do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'\n" ], "neg": [ "do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High'", "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%';", "business No. refers to business_id; have TV refers to attribute_name = 'Has TV';", "ID number refers to attribute_id", "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", "short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix'", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6;", "high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name" ] }
{ "query": "Based on all user compliments, find the percentage of low number of compliments on all compliments ID.", "pos": [ "low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100" ], "neg": [ "opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_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%", "in Anthem refers to city = 'Anthem'; the category of \"Food\" refers to category_name = 'Food'", "good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'\n", "business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'", "percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0);", "active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler'", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "beer_and_wine refers to attribute_value = 'beer_and_wine';" ] }
{ "query": "How many likes did short comment left by users who joined in 2010 get?", "pos": [ "short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010;" ], "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);", "year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars;", "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 of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars))", "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'", "categories refers to category_name; Yelp_Business no.1 refers to business_id = 1", "users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High';", "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;", "5 in the Elitestar rating refers to stars = 5;", "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 users received high compliment type in photo?", "pos": [ "high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_ID = 1" ], "neg": [ "still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM';", "low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment';", "Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4;", ";", "open businesses refers to active = 'true'; long review refers to review_length = 'Long'", "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;", "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", "year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars;" ] }
{ "query": "What city does the business came from where they received a high volume of check-ins from 12 am to 1 am on Saturday.", "pos": [ "12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday'" ], "neg": [ "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;", "running business refers to business where active = 'true';", "Yelp_Business no.1 refers to business_id = 1", "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; Scottsdale refers to city = 'Scottsdale'; day number refers to day_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)", "in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'", "average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012", "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%", "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'" ] }
{ "query": "State the ID number for the attribute named \"Accepts Insurance\"?", "pos": [ "ID number refers to attribute_id" ], "neg": [ "in Glendale refers to city = 'Glendale'", "businesses with long length tips refer to business_id where tip_length = 'Long';", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "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)", "9 am refers to opening_time = '9AM'; 9 pm refers to closing_time = '9PM'; every Saturday refers to day_of_week = 'Saturday'; location refers to city", "how long was the review refers to review_length; business number refers to business_id; user number refers to user_id;", "short tips refers to tip_length = 'short'; most number of short tips refers to MAX(COUNT(tip_length = 'short')); category refers to category_name;", "active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = 'High'", "bars refers to category_name = 'Bars';", "category refers to category_name" ] }
{ "query": "For the business with great experience existed in Sun Lakes city, provide the user ID who gave review on it and user followers.", "pos": [ "with great experience refers to stars = 5" ], "neg": [ "ID refers to business_id; category of \"Diagnostic Imaging\" refers to category_name = 'Diagnostic Imaging';", "category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars))", "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;", "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%", "Tempe is a city; high review count refers to review_count = 'High'", "active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium'", "beer_and_wine refers to attribute_value = 'beer_and_wine';", "active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters'", "opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM';", "\"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))" ] }
{ "query": "What is the total number of active businesses in AZ with a medium review count?", "pos": [ "active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium'" ], "neg": [ "active business refers to active = 'true'; Casa Grande refers to city = 'Casa Grande'", "do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'\n", "business which received the most likes refers to business_id where MAX(likes);", "closing hours refer to closing_time; business days refer to day_id from Business_Hours;", "\"Tempe\" is the name of city; long review refers to review_length = 'Long'", "attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%';", "high compliments refers to number_of_compliments = 'High'; type in photo refers to compliment_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'", "closed at 8PM refers to closing_time = '8PM';", "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": "Describe ID and active status of the business under category of \"Diagnostic Imaging\".", "pos": [ "ID refers to business_id; category of \"Diagnostic Imaging\" refers to category_name = 'Diagnostic Imaging';" ], "neg": [ "since year 2012 refers to user_yelping_since_year = '2012'", "joined yelp since 2004 refers to user_yelping_since_year = 2004;", "located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ'", "highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id))))", "low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012", "active business refers to active = 'true'; 'Pets' is the category_name", "number of running business refers to COUNT(business_id) where active = 'true'; each review count includes review_count = 'High', review_count = 'Medium', review_count = 'Low';", "opened for 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'", "running business refers to business where active = 'true';", "long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High'" ] }
{ "query": "Calculate the percentage of users with a high number of fans who were elite in 2011.", "pos": [ "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" ], "neg": [ "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)", "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", "closed at 8PM refers to closing_time = '8PM';", "long reviews refers to review_length = 'Long'; medium number of useful votes refers to review_votes_useful = '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)", "number of useful votes refers to review_votes_useful; business number refers to business_id;", "elite user for consecutively 5 years or more refers to user_id COUNT(year_id) > 5; Average star = AVG(likes)", "5 star reviews refers to review_stars = 5; business No. refers to business_id;", "year the user join the Yelp refers to user_yelping_since_year; star reviews refers to review_stars;", "shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM';" ] }
{ "query": "Find the location of businesses that have business hours from 8 am to 9 pm every Friday.", "pos": [ "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'" ], "neg": [ "\"Good for Groups\" and \"Good for Dancing\" are attribute_name; active business refers to active = true'", "the most common type of compliments refers to MAX(COUNT(compliment_type))", "\"Gilbert\" is the name of city; high review count refers to review_count = 'High'", "closed at 8PM refers to closing_time = '8PM';", "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%", "most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert'", "average review = Divide(Count(user_id), Count(business_id))", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "medium refers to number_of_compliments = 'Medium';", "\"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" ] }
{ "query": "How many businesses are registered in the database under 'Banks & Credit Unions' category?", "pos": [ "category refers to category_name" ], "neg": [ "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'", "percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100%", "in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "the most reviews refer to MAX(user_id);", "can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true'", "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)", "long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); average ratings = AVG(review_stars);", ";", "year has the most elite users refers to year_id with MAX(user_id);" ] }
{ "query": "Among the active businesses located at Chandler, AZ, list the category and atrributes of business with a medium review count.", "pos": [ "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" ], "neg": [ "business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'", "category refers to category_name", "joined yelp since 2004 refers to user_yelping_since_year = 2004;", "average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_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)", "12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday'", "user No. refers to user_id;", "opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM';", "more appealing to users refers to MAX(review_count);", "do not provide alcohol refers to attribute_name = 'Alcohol'and attribute_value = 'none'\n" ] }
{ "query": "For the Yelp business in \"Tempe\" city which got \"3.5\" stars and review count as \"Uber\", how many \"long\" reviews did it get?", "pos": [ "\"Tempe\" is the name of city; long review refers to review_length = 'Long'" ], "neg": [ "state refers to city", "highest number of reviews refers to SUBTRACT(MAX(COUNT(business_id), MIN(COUNT(business_id))))", "business category refers to category_name; most 5 star reviews refers to MAX(COUNT(category_name WHERE star_reviews = 5));", "medium refers to number_of_compliments = 'Medium';", "in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol'", "with great experience refers to stars = 5", "5 star reviews refers to review_stars = 5; business No. refers to business_id;", "average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name", "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", "business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id;" ] }
{ "query": "List all the businesses that closed at 8PM.", "pos": [ "closed at 8PM refers to closing_time = '8PM';" ], "neg": [ "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%", "types of music refers to attribute_name LIKE '%music%' WHERE attribute_value = 'true'; business No. refers to business_id;\n", "AZ refers to state = 'AZ'; stars < 3;", "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", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "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 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", "the most reviews refer to MAX(user_id);", "Arizona refers to state = 'AZ'; still running refers to active = 'true';", "music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false'" ] }
{ "query": "How many of the users who use a high number of compliments do not have any fans?", "pos": [ "do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High'" ], "neg": [ "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;", "posted more than 10 reviews refers to count(Reviews.user_id) > 10", "actively running refers to active = 'true';", "opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';", ";", "user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute';", "ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets'))", "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';", "\"Scottsdale\" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name" ] }
{ "query": "How many users have uber review votes for funny from the fans?", "pos": [ "users refer to user_id; review_votes_funny = 'uber';" ], "neg": [ "5-star refers to stars = 5; in Ahwatukee refers to city = 'Ahwatukee'; business category refers to category_name", "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", "the most common type of compliments refers to MAX(COUNT(compliment_type))", "running business refers to business where active = 'true';", "categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'", "Yelp_Business no.1 refers to business_id = 1", "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%", "user No. refers to user_id; short tip refers to tip_length = 'short'; category refers to category_name;", "\"Scottsdale\" is the name of city; high review count refers to review_count = 'High'; attribute of the business refers to attribute_name", "5 in the Elitestar rating refers to stars = 5;" ] }
{ "query": "Which actively running Yelp business in \"Gilbert\" has got the most reviews? Give the business id.", "pos": [ "actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber'" ], "neg": [ "business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id;", "businesses in \"Pets\" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100%", "low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012", "rating more than 2 refers to stars > 2;", "medium length of review refers to review_length = 'Medium'", "average star less than 3 stars refers to user_average_stars < 3; in 2012 refers to user_yelping_since_year = 2012", "the most common type of compliments refers to MAX(COUNT(compliment_type))", "business which received the most likes refers to business_id where MAX(likes);", "posted more than 10 reviews refers to count(Reviews.user_id) > 10", "active business refers to active = 'true'; category of Fashion refers to category = 'Fashion'" ] }
{ "query": "When does Yelp_Business no.1 open on Tuesdays?", "pos": [ "Yelp_Business no.1 refers to business_id = 1; open on refers to opening_time; Tuesdays refers to day_of_week = 'Tuesday'" ], "neg": [ "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", "year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year)", "\"Gilbert\" is the name of city; highest star rating refers to Max(stars)", "active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium'", "on Sunday refers to day_of_week = 'Sunday'", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "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", "ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets'))", "long refers to review_length = 'Long';" ] }
{ "query": "Among the users who received high compliments from other users, which users joined Yelp earliest?", "pos": [ "high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year)" ], "neg": [ "categories refers to category_name", "\"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", "uber number of fans refers to user_fans = 'uber';", "in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3", "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", "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)", "business number refers to business_id; Scottsdale refers to city = 'Scottsdale'; day number refers to day_id;", "actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber'", "photos type compliment refers to compliment_type = 'photos'; high cool votes refers to review_votes_cool = 'High'", "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": "How many businesses ID sell beer and wine?", "pos": [ "attribute_value = 'beer_and_wine'" ], "neg": [ "state refers to city", "medium length of review refers to review_length = 'Medium'", "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%", "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)", "Yelp_Business no.1 refers to business_id = 1", "Scottsdale refers to city = 'Scottsdale'; positive comments refers to stars > 3; Elitestar rating refers to stars;", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "open businesses refers to active = 'true'; long review refers to review_length = 'Long'", "active businesses refers to active = 'true'; attribute of caters refers to attribute_name = 'Caters'", "user's compliment in photo refers to compliment_type = 'photo'; photo has medium in number refers to number_of_compliments = 'Medium'" ] }
{ "query": "Write down the ID, active status and city of the business which are in CA state.", "pos": [ "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" ], "neg": [ "closed at 8PM refers to closing_time = '8PM';", "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);", "categories refers to category_name; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'", "AZ refers to state = 'AZ'; stars < 3;", "Arizona refers to state = 'AZ';", "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'", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM';", "the most reviews refer to MAX(user_id);", "ID number refers to attribute_id" ] }
{ "query": "Please indicate the business id have the closing time with the category of Arts & Entertainment on Sunday.", "pos": [ "Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment';" ], "neg": [ "without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert'", "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'", "on Sunday refers to day_of_week = 'Sunday'", "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%", "state refers to city", "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'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium'", "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));", "ID number refers to attribute_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'" ] }
{ "query": "How many businesses in Tempe are rated as 'Wonderful experience?", "pos": [ "in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3" ], "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'", "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", "medium reviews refers to review_length = 'Medium';", "beer_and_wine refers to attribute_value = 'beer_and_wine';", "became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id", "Arizona refers to state = 'AZ'; Elitestar rating of over 4 refers to stars > 4;", "still running refers to active = 'true'; opened from 8AM to 6PM refers to opening_time = '8AM' AND closing_time = '6PM';", "\"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))", "attribute name which start with \"music\" refers to attribute_name LIKE 'music%'", "can be attributed to 'Good for Kids' refers to attribute_name = 'Good for Kids' and attribute_value = 'true'" ] }
{ "query": "What is the percentage for the Yelp businesses in \"Pets\" category of all businesses?", "pos": [ "businesses in \"Pets\" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100%" ], "neg": [ "medium reviews refers to review_length = 'Medium';", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets'))", "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'", "high review count refers to review_count = 'High'; received 2 stars refers to stars = 2; category refers to category_name", "'Phoenix' is the city; waiter service refers to attribute_name = 'waiter_services'", "long refers to review_length = 'Long';", "active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state", "\"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": "Calculate the percentage of businesses with the category name food that are open from 7AM to 8PM in the businesses with the same time.", "pos": [ "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;" ], "neg": [ "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson';", "business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner'", "active businesses in Arizona refer to business_id where state = 'Arizona' and active = 'true'; work after 12PM refer to opening_time > '12PM';", "opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id;", "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'", "Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino'));", "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)", "shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM';", "DIVIDE(COUNT(business_id where review_count = 'Low' and active = 'true'), COUNT(business_id where review_count = 'Low' and active = 'false'));" ] }
{ "query": "How many of the busineses are in Casa Grande?", "pos": [ "in Casa Grande refers to city = 'Casa Grande'" ], "neg": [ "shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM';", "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", "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))", "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", "opening hours refers to opening_time; earlier than 8AM refers to opening_time < '8AM';", "medium length tip refers to tip_length = 'Medium';", "under the category \"Food\" refers to category_name = 'Food'", "average review = Divide(Count(user_id), Count(business_id))", "user no.3 refers to user_id = 3; in Arizona refers to state = 'AZ'; stars on average = avg(review_stars(user_id = 3))", "in Arizona refers to state = 'AZ'; user no. 3 refers to user_id = 3" ] }
{ "query": "Calculate the percentage of business with attribute name of \"Accepts Credit Cards\".", "pos": [ "percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100%" ], "neg": [ "cool compliments refers to compliment_type = 'cool'; user number refers to user_id;", "AVG(user_yelping_since_year) where user_id from Elite;", "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 business refers to active = 'true'; 'Pets' is the category_name", "opening hours before 7AM refer to opening_time < '7AM'; businesses refer 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", "opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id;", "started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High'", "\"Tempe\" is the name of city; long review refers to review_length = 'Long'", "category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars))" ] }
{ "query": "Identify the most popular and appealing active business in Gilbert based on users' reviews.", "pos": [ "most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert'" ], "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)", "1 pm refers to opening_time = '1PM'; 6 pm refers to closing_time = '6PM'; on Saturday refers to day_of_week = 'Saturday'", "\"Shopping Centers\" is the category_name; high review count refers to review_count = 'High'", "business no. 14033 refers to business_id = 14033; good for supper refers to attribute_name = 'good_for_dinner'", "active business refers to active = 'true'; 'AZ' is the state; high review count refers to review_count = '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", "ratio = divide(count(business_id where category_name = 'Shopping'), count(business_id where category_name = 'Pets'))", "active business refers to active = 'true'; category of Fashion refers to category = 'Fashion'", "ID number refers to attribute_id" ] }
{ "query": "How many open businesses in the City of Phoenix have users left a long review?", "pos": [ "open businesses refers to active = 'true'; long review refers to review_length = 'Long'" ], "neg": [ "high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year)", "business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'", "opened for 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true'", "with great experience refers to stars = 5", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "categories refers to category_name", "in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol'", "type of compliments refers to compliment_type; user No. refers to user_id;", "year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year)", "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'" ] }
{ "query": "Please list any two user numbers that have an \"Uber\" number of cute compliments.", "pos": [ "user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute';" ], "neg": [ "\"Gilbert\" is the name of city; high review count refers to review_count = 'High'", "cool compliments refers to compliment_type = 'cool'; user number refers to user_id;", "long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name;", "business No. refers to business_id; have TV refers to attribute_name = 'Has TV';", "10 am refers to opening_time = '10AM'; 12 pm refers to closing_time = '12PM'; on Sunday refers to day_of_week = 'Sunday'", "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'", "in Casa Grande refers to city = 'Casa Grande'", "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%", "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';", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;" ] }
{ "query": "For the Yelp business which had the most number of \"long\" reviews, which category does it belong to?", "pos": [ "long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name;" ], "neg": [ "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)))", "active business refers to active = 'true'; not in Arizona refers to state ! = 'AZ'; category refers to category_name", "rating more than 2 refers to stars > 2;", "attribute numbers refers to attribute_id; related to payment refers to attribute_name like '%payment%';", "medium refers to number_of_compliments = 'Medium';", "5 in the Elitestar rating refers to stars = 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", "\"ambience_romantic\" attribute refers to attribute_name = 'ambience_romantic' AND attribute_value = 'true'", "\"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", "good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'\n" ] }
{ "query": "What is the average rating of inactive businesses?", "pos": [ "rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id));" ], "neg": [ "located in Phoenix refers to city = 'Phoenix'; Arizona refers to state = 'AZ'", "year the user join the Yelp refers to user_yelping_since_year; most number of short tips refers to MAX(COUNT(tip_length = 'Short'));", "active businesses refers to active = 'true'; in Chandler refers to city = 'Chandler'", "low cool vote for user refers to user_votes_cool = 'Low';  low cool vote for review refers to review_votes_cool = 'Low'", "low number of compliments refers to number_of_compliments = 'Low'; percentage refers to DIVIDE(COUNT(number_of_compliments = 'Low'), COUNT(user_id)) * 100", "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)", "\"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", "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)", "short comment refers to tip_length = 'Short'; users who joined in 2010 refer to user_id where user_yelping_since_year = 2010;", "in Arizona refers to state = 'AZ'; closes at 12PM refers to closing_time = '12PM'; on Sundays refers to day_of_week = 'Sunday'" ] }
{ "query": "How many businesses accept insurance?", "pos": [ "business that accept insurance refers to attribute_name = 'Accepts Insurance' AND attribute_value = 'true'" ], "neg": [ "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';", "number of useful votes refers to review_votes_useful; business number refers to business_id;", "music_karaoke attribute refers to attribute_name = 'music_karaoke' AND attribute_value = 'true'; businesses are closed refers to active = 'false'", "5 star reviews refers to review_stars = 5; business No. refers to business_id;", "under the category \"Food\" refers to category_name = 'Food'", "open businesses refers to active = 'true'; long review refers to review_length = 'Long'", "more appealing to users refers to MAX(review_count);", "drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;", "users refer to user_id; review_votes_funny = 'uber';" ] }
{ "query": "Please give the order number and product name of the order which has the lowest unit price.", "pos": [ "the lowest unit price refers to MIN(Unit Price);" ], "neg": [ "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name", "total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "shipped refers to ShipDate; in 2019 refers to shipped in 2019 refers to SUBSTR(ShipDate, -2) = '19'; order in the said year refers to SUBSTR(OrderDate, -2) = '19'; highest number of order refers to Max(Count(OrderNumber))", "ordered on 10/21/18 refers to OrderDate = '10/21/18'; delivered on 11/21/19 refers to DeliveryDate = '11/21/19'; name of product refers to Product Name", "unit cost greater than 4000USD refers to Unit Cost > 4000;", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;" ] }
{ "query": "From 2018 to 2020, which year did the George Lewis group have the highest number of orders?", "pos": [ "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);" ], "neg": [ "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name", "\"Elorac, Corp\" is the Customer Names", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'" ] }
{ "query": "Which product was ordered the most in 2018?", "pos": [ "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';" ], "neg": [ "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "cities refer to City Name; no water area refers to Water Area = 0;", "applied 10% discount refers to Discount Applied = 0.1;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);" ] }
{ "query": "State the order number where Qualitest ordered the highest product quantity.", "pos": [ "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);" ], "neg": [ "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the highest net profit in 2019 refers to MAX(Net Profit) where OrderDate LIKE '%/19'; product refers to Product Name;", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8", "Medsep Group is the name of the customer; orders refer to OrderNumber;", "orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;", "average land area = Divide (Sum(Land Area), Count(Land Area))", "the highest unit price refers to MAX(Unit Price);", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))" ] }
{ "query": "Which city has the largest population?", "pos": [ "city has the largest population refers to City Name where MAX(Population);" ], "neg": [ "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "order refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'; January refers to Substr(OrderDate, 1, 1) = '1';  most preferred sales channel refers to Sales Channel where Max(Count(OrderNumber))", "total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';", "\"Joshua Bennett\" is the name of Sales Team", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100" ] }
{ "query": "Please list the names of customers who have total orders of over 3 in 2018.", "pos": [ "total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';" ], "neg": [ "sale team ID of 18 refers to _SalesTeamID = 18; COUNT(OrderNumber where Sales Channel = 'In-Store') > COUNT(OrderNumber where Sales Channel = 'Online');", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "\"Midwest\" is the Region", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "orders online refer to Sales Channel = 'Online';", "most populated refers to Max(Population);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);" ] }
{ "query": "Among the products with an order quantity of no less than 5 that was shipped in the month of May 2019, what is the name of the product with the lowest net profit?", "pos": [ "order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name" ], "neg": [ "city has the largest population refers to City Name where MAX(Population);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the highest net profit in 2019 refers to MAX(Net Profit) where OrderDate LIKE '%/19'; product refers to Product Name;", "\"WARE-UHY1004\" is the WarehouseCode", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "Medsep Group is the name of the customer; orders refer to OrderNumber;", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))" ] }
{ "query": "How many stores procured products on October 27, 2018, in the city of Oregon?", "pos": [ "October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State" ], "neg": [ "highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "\"Midwest\" is the Region", "the highest unit price refers to MAX(Unit Price);", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;", "order refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'; January refers to Substr(OrderDate, 1, 1) = '1';  most preferred sales channel refers to Sales Channel where Max(Count(OrderNumber))" ] }
{ "query": "Please list the id and detailed position of all stores in Birmingham city.", "pos": [ "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;" ], "neg": [ "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "cities refer to City Name; no water area refers to Water Area = 0;", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "most populous country refers to Max(Population)", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'" ] }
{ "query": "What is the detailed position of the store which has order SO - 000115?", "pos": [ "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';" ], "neg": [ "unit cost greater than 4000USD refers to Unit Cost > 4000;", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';", "\"WARE-MKL1006\" is the WarehouseCode; most shipment to region refers to Max(Count(Region))", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';" ] }
{ "query": "Calculate the average net profit of phones which have sales channel of distributor.", "pos": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';" ], "neg": [ "order quantity greater than 5 refers to Order Quantity > 5", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "\"Michigan\" is the State", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "Rochester Ltd is the name of the customer; orders refer to OrderNumber;", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "Cookware is the name of the product;", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);" ] }
{ "query": "Among the products sold in Maricopa County, which was the least sold?", "pos": [ "the least sold product refers to Product Name where MIN(Order Quantity);" ], "neg": [ "the most number of sales team refers to MAX(COUNT(Sales Team));", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "shipped refers to ShipDate; in 2019 refers to shipped in 2019 refers to SUBSTR(ShipDate, -2) = '19'; order in the said year refers to SUBSTR(OrderDate, -2) = '19'; highest number of order refers to Max(Count(OrderNumber))", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "\"Elorac, Corp\" is the Customer Names", "Medsep Group is the name of the customer; orders refer to OrderNumber;", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');" ] }
{ "query": "Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?", "pos": [ "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;" ], "neg": [ "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;", "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "Medsep Group is the name of the customer; orders refer to OrderNumber;" ] }
{ "query": "How many Borough-type stores located in the city of Brooklyn have a population of less than 3 million?", "pos": [ "\"Brooklyn\" is the CityName; population of less than 3 million refers to Population < 3000000" ], "neg": [ "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "highest unit price refers to Max(Unit Price)", "sale team ID of 18 refers to _SalesTeamID = 18; COUNT(OrderNumber where Sales Channel = 'In-Store') > COUNT(OrderNumber where Sales Channel = 'Online');", "highest unit price refers to Max(Unit Price)", "shipped refers to ShipDate; in 2019 refers to shipped in 2019 refers to SUBSTR(ShipDate, -2) = '19'; order in the said year refers to SUBSTR(OrderDate, -2) = '19'; highest number of order refers to Max(Count(OrderNumber))", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8" ] }
{ "query": "Describe the product names delivered in 2021 for the customer \"Sundial\".", "pos": [ "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names" ], "neg": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "average land area = Divide (Sum(Land Area), Count(Land Area))", "\"WARE-UHY1004\" is the WarehouseCode", "the most number of sales team refers to MAX(COUNT(Sales Team));", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "the highest unit price refers to MAX(Unit Price);", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "order quantity greater than 5 refers to Order Quantity > 5", "California is a state; CDP stores refer to StoreID where Type = 'CDP';", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);" ] }
{ "query": "Which order number has the highest unit price?", "pos": [ "the highest unit price refers to MAX(Unit Price);" ], "neg": [ "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "cities refer to City Name; no water area refers to Water Area = 0;", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;" ] }
{ "query": "How many stores with less need for products, and purchased through a distributor, are located in Washtenaw County?", "pos": [ "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County" ], "neg": [ "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "the lowest unit price refers to MIN(Unit Price);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the highest net profit in 2019 refers to MAX(Net Profit) where OrderDate LIKE '%/19'; product refers to Product Name;", "orders online refer to Sales Channel = 'Online';", "city has the largest population refers to City Name where MAX(Population);", "highest unit price refers to Max(Unit Price)", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "most populated refers to Max(Population);" ] }
{ "query": "Calculate the total net profit of the store located in highest median income city.", "pos": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);" ], "neg": [ "AVG(Unit Price where Product Name = 'Cookware');", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "California is a state; CDP stores refer to StoreID where Type = 'CDP';", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "highest unit price refers to Max(Unit Price)", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'" ] }
{ "query": "Which region has the most number of sales team?", "pos": [ "the most number of sales team refers to MAX(COUNT(Sales Team));" ], "neg": [ "orders refer to OrderNumber;", "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000", "Cookware is the name of the product;", "city has the largest population refers to City Name where MAX(Population);", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';", "highest discount applied refers to Max(Discount Applied)", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "\"Michigan\" is the State" ] }
{ "query": "List the ID, city, state and region for the store type which is fewer between borough and CDP.", "pos": [ "COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');" ], "neg": [ "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "Cookware is the name of the product;", "October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));" ] }
{ "query": "Which sales team name has the least orders in 2019?", "pos": [ "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));" ], "neg": [ "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);", "DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "the lowest unit price refers to MIN(Unit Price);", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';", "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "cities refer to City Name; no water area refers to Water Area = 0;", "Medsep Group is the name of the customer; orders refer to OrderNumber;" ] }
{ "query": "What is the percentage of total orders from stores in Orange County in 2018?", "pos": [ "DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;" ], "neg": [ "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "Rochester Ltd is the name of the customer; orders refer to OrderNumber;", "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;", "\"Brooklyn\" is the CityName; population of less than 3 million refers to Population < 3000000", "total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "order refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'; January refers to Substr(OrderDate, 1, 1) = '1';  most preferred sales channel refers to Sales Channel where Max(Count(OrderNumber))", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "\"Elorac, Corp\" is the Customer Names" ] }
{ "query": "What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.", "pos": [ "highest discount applied refers to Max(Discount Applied)" ], "neg": [ "\"Michigan\" is the State", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "orders online refer to Sales Channel = 'Online';", "ordered on 10/21/18 refers to OrderDate = '10/21/18'; delivered on 11/21/19 refers to DeliveryDate = '11/21/19'; name of product refers to Product Name", "orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;", "October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "applied 10% discount refers to Discount Applied = 0.1;", "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);", "\"Joshua Bennett\" is the name of Sales Team" ] }
{ "query": "Which product has the highest net profit in 2019?", "pos": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the highest net profit in 2019 refers to MAX(Net Profit) where OrderDate LIKE '%/19'; product refers to Product Name;" ], "neg": [ "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "orders refer to OrderNumber;", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);", "orders online refer to Sales Channel = 'Online';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name" ] }
{ "query": "List the order numbers and product names which were ordered on 6th June, 2018.", "pos": [ "ordered on 6th June 2018 refers to OrderDate = '6/5/18'" ], "neg": [ "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "the lowest unit price refers to MIN(Unit Price);", "highest unit price refers to Max(Unit Price)", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;", "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)" ] }
{ "query": "In 2020, what were the total orders of all stores in Maricopa County?", "pos": [ "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';" ], "neg": [ "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "over 3800 USD in net profit refers to SUBTRACT(Unit Price, Unit Cost) where Net Profit > 3800;", "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "\"Midwest\" is the Region", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;" ] }
{ "query": "Sate the order number and calculate the net profit for each order under Joshua Bennett.", "pos": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;" ], "neg": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;", "order quantity greater than 5 refers to Order Quantity > 5", "highest discount applied refers to Max(Discount Applied)", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "ordered on 10/21/18 refers to OrderDate = '10/21/18'; delivered on 11/21/19 refers to DeliveryDate = '11/21/19'; name of product refers to Product Name", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))", "highest unit price refers to Max(Unit Price)", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8" ] }
{ "query": "Provide order number, warehouse code of customers Elorac, Corp.", "pos": [ "\"Elorac, Corp\" is the Customer Names" ], "neg": [ "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);", "Cookware is the name of the product;", "\"Joshua Bennett\" is the name of Sales Team", "cities refer to City Name; no water area refers to Water Area = 0;", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "most populated refers to Max(Population);" ] }
{ "query": "In 2019, how many orders were shipped by the sales team with the highest number of orders in the said year? Provide the name of the sales team.", "pos": [ "shipped refers to ShipDate; in 2019 refers to shipped in 2019 refers to SUBSTR(ShipDate, -2) = '19'; order in the said year refers to SUBSTR(OrderDate, -2) = '19'; highest number of order refers to Max(Count(OrderNumber))" ], "neg": [ "DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;", "orders online refer to Sales Channel = 'Online';", "city has the largest population refers to City Name where MAX(Population);", "highest discount applied refers to Max(Discount Applied)", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "the most number of sales team refers to MAX(COUNT(Sales Team));", "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);" ] }
{ "query": "Compare the number of orders between \"Platters\" and \"Serveware\" products.", "pos": [ "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');" ], "neg": [ "orders refer to OrderNumber;", "highest unit price refers to Max(Unit Price)", "sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; product refers to Product Name", "\"Michigan\" is the State", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "most populated refers to Max(Population);", "the highest unit price refers to MAX(Unit Price);", "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;" ] }
{ "query": "Which store in Arizona has the most net profit?", "pos": [ "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))" ], "neg": [ "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; product refers to Product Name", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);", "products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;", "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))" ] }
{ "query": "Find the average number of ornaments sold each month in 2018.", "pos": [ "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);" ], "neg": [ "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "\"Midwest\" is the Region", "the least sold product refers to Product Name where MIN(Order Quantity);", "California is a state; CDP stores refer to StoreID where Type = 'CDP';", "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))" ] }
{ "query": "How many sales channels does the sales team have in the Midwest?", "pos": [ "\"Midwest\" is the Region" ], "neg": [ "\"Chandler\" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "highest unit price refers to Max(Unit Price)", "the most number of sales team refers to MAX(COUNT(Sales Team));", "\"Elorac, Corp\" is the Customer Names", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "orders online refer to Sales Channel = 'Online';" ] }
{ "query": "List the store located cities with regions in no water area of California state.", "pos": [ "cities refer to City Name; no water area refers to Water Area = 0;" ], "neg": [ "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';", "the least sold product refers to Product Name where MIN(Order Quantity);", "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "the highest unit price refers to MAX(Unit Price);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "highest unit price refers to Max(Unit Price)", "order refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'; January refers to Substr(OrderDate, 1, 1) = '1';  most preferred sales channel refers to Sales Channel where Max(Count(OrderNumber))", "orders refer to OrderNumber;" ] }
{ "query": "In which regions are the stores that have shipped products through the WARE-UHY1004 warehouse?", "pos": [ "\"WARE-UHY1004\" is the WarehouseCode" ], "neg": [ "Rochester Ltd is the name of the customer; orders refer to OrderNumber;", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "most populous country refers to Max(Population)", "orders refer to OrderNumber;", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;", "highest unit price refers to Max(Unit Price)", "\"Michigan\" is the State" ] }
{ "query": "How many orders placed were with more than 5 product quantities?", "pos": [ "orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;" ], "neg": [ "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))", "order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "\"Midwest\" is the Region", "\"WARE-MKL1006\" is the WarehouseCode; most shipment to region refers to Max(Count(Region))", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;", "cities refer to City Name; no water area refers to Water Area = 0;", "the lowest unit price refers to MIN(Unit Price);" ] }
{ "query": "Which region is Joshua Bennet located in?", "pos": [ "\"Joshua Bennett\" is the name of Sales Team" ], "neg": [ "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';", "40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;", "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "highest discount applied refers to Max(Discount Applied)", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';" ] }
{ "query": "Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date?", "pos": [ "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)" ], "neg": [ "the lowest unit price refers to MIN(Unit Price);", "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "order quantity greater than 5 refers to Order Quantity > 5", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;", "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "orders refer to OrderNumber;", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8", "COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';" ] }
{ "query": "Please indicate store id in the state of California that have been applied 20% discount in store.", "pos": [ "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'" ], "neg": [ "cities refer to City Name; no water area refers to Water Area = 0;", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "applied 10% discount refers to Discount Applied = 0.1;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))" ] }
{ "query": "What is the average land area of ​​the cities in which stores that purchased products for a unit price of 998.30 are located?", "pos": [ "average land area = Divide (Sum(Land Area), Count(Land Area))" ], "neg": [ "sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; product refers to Product Name", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "highest unit price refers to Max(Unit Price)", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "most populous country refers to Max(Population)", "AVG(Unit Price where Product Name = 'Cookware');", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))" ] }
{ "query": "List all the order numbers for In-Store sales and find the city where the store is located.", "pos": [ "In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;" ], "neg": [ "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "\"WARE-MKL1006\" is the WarehouseCode; most shipment to region refers to Max(Count(Region))", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "orders refer to OrderNumber;", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "the least sold product refers to Product Name where MIN(Order Quantity);", "the highest unit price refers to MAX(Unit Price);" ] }
{ "query": "Find the net profit of the floral products which were delivered in 2021.", "pos": [ "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'" ], "neg": [ "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State", "all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;", "\"Midwest\" is the Region", "most populated refers to Max(Population);", "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);", "products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);" ] }
{ "query": "Write down the store IDs and region of the state \"Michigan\".", "pos": [ "\"Michigan\" is the State" ], "neg": [ "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "most populated refers to Max(Population);", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "Rochester Ltd is the name of the customer; orders refer to OrderNumber;", "over 3800 USD in net profit refers to SUBTRACT(Unit Price, Unit Cost) where Net Profit > 3800;" ] }
{ "query": "What is the percentage of total orders of Stephen Payne that had a net profit of over 1000?", "pos": [ "Sales Team = 'Stephen Payne'; net profit can be computed as SUBTRACT(Unit Price, Unit Cost); DIVIDE(COUNT(OrderNumber where Sales Team = 'Stephen Payne' and Net Profit > 1000)), (COUNT(OrderNumber where Sales Team = 'Stephen Payne')) as percentage;" ], "neg": [ "the least sold product refers to Product Name where MIN(Order Quantity);", "all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "highest unit price refers to Max(Unit Price)", "unit cost greater than 4000USD refers to Unit Cost > 4000;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;", "Cookware is the name of the product;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "\"WARE-MKL1006\" is the WarehouseCode; most shipment to region refers to Max(Count(Region))", "product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';" ] }
{ "query": "List the name of the customer with the most number of order quantity from 2018 to 2020.", "pos": [ "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8" ], "neg": [ "order refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'; January refers to Substr(OrderDate, 1, 1) = '1';  most preferred sales channel refers to Sales Channel where Max(Count(OrderNumber))", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');", "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "Rochester Ltd is the name of the customer; orders refer to OrderNumber;", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "\"Midwest\" is the Region", "\"Michigan\" is the State" ] }
{ "query": "How many orders that Medsep Group had made?", "pos": [ "Medsep Group is the name of the customer; orders refer to OrderNumber;" ], "neg": [ "Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';", "\"Midwest\" is the Region", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "the highest unit price refers to MAX(Unit Price);", "applied 10% discount refers to Discount Applied = 0.1;", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "highest discount applied refers to Max(Discount Applied)", "\"Brooklyn\" is the CityName; population of less than 3 million refers to Population < 3000000", "AVG(Unit Price where Product Name = 'Cookware');" ] }
{ "query": "Calculate ratio between the highest unit cost and the lowest unit cost?", "pos": [ "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);" ], "neg": [ "applied 10% discount refers to Discount Applied = 0.1;", "name containing the word 'Group' refers to Customer Names LIKE '%Group%';", "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "George Lewis refers to Sales Team; the highest number of orders refers to MAX(COUNT(OrderNumber)); which year from 2018 to 2020 refers to SUBSTR(OrderDate, -2) IN ('18', '19', '20') GROUP BY SUBSTR(OrderDate, -2);", "highest discount applied refers to Max(Discount Applied)", "most populated refers to Max(Population);", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "Medsep Group is the name of the customer; orders refer to OrderNumber;", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';" ] }
{ "query": "List all the customers with name containing the word 'Group'.", "pos": [ "name containing the word 'Group' refers to Customer Names LIKE '%Group%';" ], "neg": [ "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));", "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "AVG(Unit Price where Product Name = 'Cookware');", "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name" ] }
{ "query": "Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.", "pos": [ "sale team ID of 18 refers to _SalesTeamID = 18; COUNT(OrderNumber where Sales Channel = 'In-Store') > COUNT(OrderNumber where Sales Channel = 'Online');" ], "neg": [ "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "the highest unit price refers to MAX(Unit Price);", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8", "the most number of sales team refers to MAX(COUNT(Sales Team));", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); the greatest net profit in 2020 refers to MAX(net profit) where OrderDate LIKE '%/20';" ] }
{ "query": "Name the product that was registered in the sales order 'SO - 0005951'.", "pos": [ "sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; product refers to Product Name" ], "neg": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;", "DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "\"Apollo Ltd\" is the Customer Names; most expensive unit price refers to max(Unit Price)", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;", "Medline is the name of the customer; DIVIDE(COUNT(OrderNumber where Sales Channel = 'In-Store' and Customer Names = 'Medline'), COUNT(OrderNumber where Customer Names = 'Medline')) as percentage;" ] }
{ "query": "In the Northeast region, what is the average household income for each city located in the state with the highest number of stores?", "pos": [ "average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))" ], "neg": [ "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "the highest unit price refers to MAX(Unit Price);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "cities refer to City Name; no water area refers to Water Area = 0;", "highest unit price refers to Max(Unit Price)", "average land area = Divide (Sum(Land Area), Count(Land Area))", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "detailed coordinates refers to Latitude, Longitude; highest net profit = Max(Subtract(Unit Price, Unit Cost))", "Medsep Group is the name of the customer; orders refer to OrderNumber;", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'" ] }
{ "query": "What is the average unit price of a Cookware product?", "pos": [ "AVG(Unit Price where Product Name = 'Cookware');" ], "neg": [ "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "most populated refers to Max(Population);", "total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';", "WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "order quantity of no less than 5 refers to Order Quantity > 5; shipped in the month of May 2019 refers to ShipDate LIKE '5/%/19'; lowest net profit = Min(Subtract(Unit Price, Unit Cost)); name of product refers to Products Name", "city has the largest population refers to City Name where MAX(Population);", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "type of store in City refers to Type = 'City'; highest amount of water area refers to Max(Water Area)", "the highest unit price refers to MAX(Unit Price);" ] }
{ "query": "How many orders through distributor were for the minimum quantity?", "pos": [ "\"Distributor\" is the Sales Channel; minimum quantity refers to Min(Order Quantity)" ], "neg": [ "COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');", "Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;", "\"California\" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'", "floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'", "sales order on 04/04/2020 refers to OrderDate = '4/4/20'; 'New York' is  the City Name; percentage = Divide (Sum(OrderNumber where City Name = 'New York'), Count (OrderNumber)) * 100", "Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);", "AVG(Unit Price where Product Name = 'Cookware');" ] }
{ "query": "Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.", "pos": [ "all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;" ], "neg": [ "October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State", "cities refer to City Name; no water area refers to Water Area = 0;", "name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8", "\"Brooklyn\" is the CityName; population of less than 3 million refers to Population < 3000000", "highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name", "\"Arizona\" is the name of State; most net profit = Max(Subtract( Unit Price, Unit Cost))", "delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names", "less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County", "ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);", "most populated refers to Max(Population);" ] }
{ "query": "List the name of all customers who had made orders online.", "pos": [ "orders online refer to Sales Channel = 'Online';" ], "neg": [ "\"Weimei Corp\" is the Customer Names; in 2018, 2019 and 2020 refers to SUBSTR (OrderDate, -2) IN ('18', '19', '20') : Average order = Divide (Count (OrderNumber), 3)", "Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';", "city has the largest population refers to City Name where MAX(Population);", "net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;", "ordered on 6th June 2018 refers to OrderDate = '6/5/18'", "most populated refers to Max(Population);", "products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'", "Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);", "total order quantity refers to Sum (Order Quantity); 'Candles' is the Products Name; percentage = Divide (Sum(Order Quantity where Product Name = 'Candles'), Sum(Order Quantity)) * 100", "number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000" ] }