query
stringlengths
24
325
positive
stringlengths
1
580
negative_1
stringlengths
6
580
negative_2
stringlengths
1
576
negative_3
stringlengths
1
576
negative_4
stringlengths
1
580
negative_5
stringlengths
1
580
negative_6
stringlengths
1
580
negative_7
stringlengths
5
576
negative_8
stringlengths
1
576
negative_9
stringlengths
1
580
negative_10
stringlengths
1
580
What city does the business came from where they received a high volume of check-ins from 12 am to 1 am on Saturday.
12 am refers to opening_time = '12AM'; 1 am refers to closing_time = '1AM'; on Saturday refers to day_of_week = 'Saturday'
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'
State the ID number for the attribute named "Accepts Insurance"?
ID number refers to attribute_id
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
For the business with great experience existed in Sun Lakes city, provide the user ID who gave review on it and user followers.
with great experience refers to stars = 5
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))
What is the total number of active businesses in AZ with a medium review count?
active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium'
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'
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%
Describe ID and active status of the business under category of "Diagnostic Imaging".
ID refers to business_id; category of "Diagnostic Imaging" refers to category_name = 'Diagnostic Imaging';
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'
Calculate the percentage of users with a high number of fans who were elite in 2011.
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
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';
Find the location of businesses that have business hours from 8 am to 9 pm every Friday.
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'
"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
How many businesses are registered in the database under 'Banks & Credit Unions' category?
category refers to category_name
user yelping since 2010 to 2012 refers to user_yelping_since_year > = '2010' AND user_yelping_since_year < '2013'; low fans refers to user_fans = 'Low'
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);
Among the active businesses located at Chandler, AZ, list the category and atrributes of business with a medium review count.
active businesses refers to active = 'true'; located at Chandler, AZ refers to city = 'Chandler', state = 'AZ'; category refers to category_name; atrributes refers to attribute_name
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'
For the Yelp business in "Tempe" city which got "3.5" stars and review count as "Uber", how many "long" reviews did it get?
"Tempe" is the name of city; long review refers to review_length = 'Long'
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;
List all the businesses that closed at 8PM.
closed at 8PM refers to closing_time = '8PM';
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;
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'
How many of the users who use a high number of compliments do not have any fans?
do not have fans refers to user_fans = 'None'; high number of compliment refers to number_of_compliments = 'High'
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
How many users have uber review votes for funny from the fans?
users refer to user_id; review_votes_funny = 'uber';
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;
Which actively running Yelp business in "Gilbert" has got the most reviews? Give the business id.
actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber'
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'
When does Yelp_Business no.1 open on Tuesdays?
Yelp_Business no.1 refers to business_id = 1; open on refers to opening_time; Tuesdays refers to day_of_week = 'Tuesday'
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';
Among the users who received high compliments from other users, which users joined Yelp earliest?
high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year)
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'));
How many businesses ID sell beer and wine?
attribute_value = 'beer_and_wine'
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'
Write down the ID, active status and city of the business which are in CA state.
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
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
Please indicate the business id have the closing time with the category of Arts & Entertainment on Sunday.
Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment';
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'
How many businesses in Tempe are rated as 'Wonderful experience?
in Tempe refers to city = 'Tempe'; rated as 'Wonderful experience refers to stars > 3
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'
What is the percentage for the Yelp businesses in "Pets" category of all businesses?
businesses in "Pets" category refers to category_name = 'Pets'; percentage refers to DIVIDE(COUNT(category_name = 'Pets'), COUNT(business_id)) * 100%
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
Calculate the percentage of businesses with the category name food that are open from 7AM to 8PM in the businesses with the same time.
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;
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'));
How many of the busineses are in Casa Grande?
in Casa Grande refers to city = 'Casa Grande'
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
Calculate the percentage of business with attribute name of "Accepts Credit Cards".
percentage refers to DIVIDE(COUNT(attribute_name = 'Accepts Credit Cards'), COUNT(business_id))*100%
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))
Identify the most popular and appealing active business in Gilbert based on users' reviews.
most popular and appealing refers to review_count = 'High' and max(stars); active business refers to active = 'true'; in Gilbert refers to city = 'Gilbert'
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
How many open businesses in the City of Phoenix have users left a long review?
open businesses refers to active = 'true'; long review refers to review_length = 'Long'
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'
Please list any two user numbers that have an "Uber" number of cute compliments.
user numbers refers to user_id; Uber number refers to number_of_compliments = 'Uber'; cute compliments refers to compliment_type = 'cute';
"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;
For the Yelp business which had the most number of "long" reviews, which category does it belong to?
long reviews refers to review_length = 'long'; most number of long reviews refers to MAX(COUNT(review_length = 'long')); category refers to category_name;
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'
What is the average rating of inactive businesses?
rating refers to stars; inactive refers to active = 'False'; average rating of inactive businesses = DIVIDE(SUM(stars), COUNT(business_id));
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'
How many businesses accept insurance?
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'
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';
Please give the order number and product name of the order which has the lowest unit price.
the lowest unit price refers to MIN(Unit Price);
"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;
From 2018 to 2020, which year did the George Lewis group have the highest number of orders?
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 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'
Which product was ordered the most in 2018?
product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '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;
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);
State the order number where Qualitest ordered the highest product quantity.
Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);
"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))
Which city has the largest population?
city has the largest population refers to City Name where MAX(Population);
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
Please list the names of customers who have total orders of over 3 in 2018.
total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';
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);
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?
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);
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))
How many stores procured products on October 27, 2018, in the city of Oregon?
October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State
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))
Please list the id and detailed position of all stores in Birmingham city.
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';
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'
What is the detailed position of the store which has order SO - 000115?
Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';
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';
Calculate the average net profit of phones which have sales channel of distributor.
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';
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);
Among the products sold in Maricopa County, which was the least sold?
the least sold product refers to Product Name where MIN(Order Quantity);
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');
Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?
40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;
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;
How many Borough-type stores located in the city of Brooklyn have a population of less than 3 million?
"Brooklyn" is the CityName; population of less than 3 million refers to Population < 3000000
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
Describe the product names delivered in 2021 for the customer "Sundial".
delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names
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);
Which order number has the highest unit price?
the highest unit price refers to MAX(Unit Price);
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;
How many stores with less need for products, and purchased through a distributor, are located in Washtenaw County?
less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County
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);
Calculate the total net profit of the store located in highest median income city.
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');
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'
Which region has the most number of sales team?
the most number of sales team refers to MAX(COUNT(Sales Team));
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
List the ID, city, state and region for the store type which is fewer between borough and CDP.
COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(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;
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'));
Which sales team name has the least orders in 2019?
sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));
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;
What is the percentage of total orders from stores in Orange County in 2018?
DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;
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
What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.
highest discount applied refers to Max(Discount Applied)
"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
Which product has the highest net profit in 2019?
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;
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
List the order numbers and product names which were ordered on 6th June, 2018.
ordered on 6th June 2018 refers to OrderDate = '6/5/18'
"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)
In 2020, what were the total orders of all stores in Maricopa County?
total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';
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;
Sate the order number and calculate the net profit for each order under Joshua Bennett.
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;
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
Provide order number, warehouse code of customers Elorac, Corp.
"Elorac, Corp" is the Customer Names
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);
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.
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))
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);
Compare the number of orders between "Platters" and "Serveware" products.
COUNT(OrderNumber where Product Name = 'Platters') > COUNT(OrderNumber where Product Name = 'Serveware');
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;
Which store in Arizona has the most net profit?
"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
"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))
Find the average number of ornaments sold each month in 2018.
DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);
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))
How many sales channels does the sales team have in the Midwest?
"Midwest" is the Region
"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';
List the store located cities with regions in no water area of California state.
cities refer to City Name; no water area refers to Water Area = 0;
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;
In which regions are the stores that have shipped products through the WARE-UHY1004 warehouse?
"WARE-UHY1004" is the WarehouseCode
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
How many orders placed were with more than 5 product quantities?
orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;
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);
Which region is Joshua Bennet located in?
"Joshua Bennett" is the name of Sales Team
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';
Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date?
"Apollo Ltd" is the Customer Names; most expensive unit price refers to max(Unit Price)
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%';
Please indicate store id in the state of California that have been applied 20% discount in store.
"California" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'
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))
What is the average land area of ​​the cities in which stores that purchased products for a unit price of 998.30 are located?
average land area = Divide (Sum(Land Area), Count(Land Area))
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))
List all the order numbers for In-Store sales and find the city where the store is located.
In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;
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);
Find the net profit of the floral products which were delivered in 2021.
floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'
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);
Write down the store IDs and region of the state "Michigan".
"Michigan" is the State
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;
What is the percentage of total orders of Stephen Payne that had a net profit of over 1000?
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;
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';
List the name of the customer with the most number of order quantity from 2018 to 2020.
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
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
How many orders that Medsep Group had made?
Medsep Group is the name of the customer; orders refer to OrderNumber;
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');
Calculate ratio between the highest unit cost and the lowest unit cost?
ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);
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';
List all the customers with name containing the word 'Group'.
name containing the word 'Group' refers to Customer Names LIKE '%Group%';
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
Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.
sale team ID of 18 refers to _SalesTeamID = 18; COUNT(OrderNumber where Sales Channel = 'In-Store') > COUNT(OrderNumber where Sales Channel = 'Online');
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';
Name the product that was registered in the sales order 'SO - 0005951'.
sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; product refers to Product Name
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;
In the Northeast region, what is the average household income for each city located in the state with the highest number of stores?
average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))
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'
What is the average unit price of a Cookware product?
AVG(Unit Price where Product Name = 'Cookware');
"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);
How many orders through distributor were for the minimum quantity?
"Distributor" is the Sales Channel; minimum quantity refers to Min(Order Quantity)
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');
Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.
all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;
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);
List the name of all customers who had made orders online.
orders online refer to Sales Channel = 'Online';
"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
How many CDP stores are there in California?
California is a state; CDP stores refer to StoreID where Type = 'CDP';
WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))
Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;
the least sold product refers to Product Name where MIN(Order Quantity);
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bar Tools' and Order Quantity > 5;
highest discount applied refers to Max(Discount Applied)
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;
DIVIDE(COUNT(OrderNumber where County = 'Orange County' and SUBSTR(OrderDate, -2) = '18'), COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '18')) as percentage;
highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name
products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;
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;
List out the discount levels applied for all orders from Ole Group.
Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;
"Midwest" is the Region
the lowest unit price refers to MIN(Unit Price);
DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);
products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;
"Brooklyn" is the CityName; population of less than 3 million refers to Population < 3000000
sales order 'SO - 0005951' refers to OrderNumber = 'SO - 0005951'; 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;
Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;
number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000
Lists the name of the product and customer who placed an order on 10/21/18 and it was delivered on 11/21/19.
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
COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');
October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State
orders refer to OrderNumber;
"WARE-UHY1004" is the WarehouseCode
"WARE-MKL1006" is the WarehouseCode; most shipment to region refers to Max(Count(Region))
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
floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'
"California" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'
Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;
Qualitest ordered the highest product quantity refers to Customer Names where MAX(Order Quantity);
Mention the most populated city and median income of the store in Florida state.
most populated refers to Max(Population);
In-Store sales refer to Sales Channel = 'In-Store'; city refers to City Name;
October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State
the most number of sales team refers to MAX(COUNT(Sales Team));
Rochester Ltd is the name of the customer; orders refer to OrderNumber;
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);
"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)
sale team names refer to Sales Team; the least orders in 2019 refer to MIN(COUNT(OrderNumber where SUBSTR(OrderDate, -2) = '19'));
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))
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
average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))
Find the number of baseball ordered in December 2017.
Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';
California is a state; CDP stores refer to StoreID where Type = 'CDP';
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)
products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;
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
"California" is the name of State; in store refers to Sales Channel = 'In-Store'; 20% discount refers to Discount Applied = '0.2'
"Midwest" is the Region
"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)
Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;
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;
How many orders have order date in 5/31/2018?
orders refer to OrderNumber;
floral product refers to Product Name = 'Floral'; total net profit = SUM(Subtract(Unit Price, Unit Cost)); delivered in 2021 refers to DeliveryDate LIKE '%/21'
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
ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);
average land area = Divide (Sum(Land Area), Count(Land Area))
WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))
order quantity greater than 5 refers to Order Quantity > 5
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;
"Joshua Bennett" is the name of Sales Team
product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';
the most number of sales team refers to MAX(COUNT(Sales Team));
What is the store id of the store located in the most populous county?
most populous country refers to Max(Population)
Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID;
the 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))
products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;
California is a state; CDP stores refer to StoreID where Type = 'CDP';
Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';
Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';
total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';
Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';
"Chandler" is the City Name; orders refers to OrderDate; in 2020 refers to Substr(OrderDate, -2) = '20'
Which sales team has the other with the highest unit price?
highest unit price refers to Max(Unit Price)
"Joshua Bennett" is the name of Sales Team
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);
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); the highest net profit in 2019 refers to MAX(Net Profit) where OrderDate LIKE '%/19'; 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);
highest unit price refers to Max(Unit Price)
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)
average land area = Divide (Sum(Land Area), Count(Land Area))
Calculate the average net profit for bakeware product.
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';
in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))
order quantity greater than 5 refers to Order Quantity > 5
Latitude and Longitude coordinates can be used to identify the detailed position of stores; store refers to StoreID WHERE OrderNumber = 'SO - 000115';
shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;
name containing the word 'Group' refers to Customer Names LIKE '%Group%';
average land area = Divide (Sum(Land Area), Count(Land Area))
highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name
Rochester Ltd is the name of the customer; all the numbers ordered refer to OrderNumber; 2018 refers to SUBSTR(OrderDate, -2) = '18';
unit cost greater than 4000USD refers to Unit Cost > 4000;
ratio can be calculated as DIVIDE(MAX(Unit_Cost)), MIN(Unit Cost);
At what Latitude and Longitude is the store that has used the WARE-PUJ1005 warehouse the fewest times?
WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))
COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');
highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); highest median income city refers to City Name where MAX(Median Income);
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))
highest discount applied refers to Max(Discount Applied)
"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';
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); Joshua Bennett is the name of Sales Team;
"Brooklyn" is the CityName; population of less than 3 million refers to Population < 3000000
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
List all orders where its products were shipped from Daly City.
shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;
total orders refer to COUNT(OrderNumber); 2020 refers to SUBSTR(OrderDate, -2) = '20';
orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;
WARE-PUJ1005 is the WarehouseCode; fewest times refers to Min (Count(WarehouseCode))
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); Joshua Bennett is the name of Sales Team;
net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Phones' and Sales Channel = 'Distributor';
name containing the word 'Group' refers to Customer Names LIKE '%Group%';
Product Name = 'Baseball'; December 2017 refers to OrderDate LIKE '12/%/17';
highest unit price refers to Max(Unit Price)
Rochester Ltd is the name of the customer; orders refer to OrderNumber;
What type of store is most popular in the South?
in the South refers to Region = 'South'; type of store that is most popular refers to Max(Count(Type))
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);
the least sold product refers to Product Name where 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;
"Midwest" is the Region
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;
"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)
orders refer to OrderNumber;
"Elorac, Corp" is the Customer Names
city has the largest population refers to City Name where 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);
What is the amount of discount applied to the product with the highest net profit and what is the name of the said product?
highest net profit refers to Max(Subtract(Unit Price, Unit Cost)); name of product refers to Product Name
shipped from Daly City refers to Store Locations where City Name = 'Daly City'; orders refer to OrderNumber;
highest net profit = Max(Subtract (Unit Price, Unit Cost)); name of product refers to Product Name
products refers to Product Name; via wholesale channel refers to Sales Channel = 'Wholesale'
"Joshua Bennett" is the name of Sales Team
"Distributor" is the Sales Channel; minimum quantity refers to Min(Order Quantity)
product refers to Product Name; ordered the most in 2018 refers to MAX(COUNT(OrderNumber)) where SUBSTR(OrderDate, -2) = '18';
total orders of over 3 in 2018 refer to COUNT(OrderNumber) > 3 where SUBSTR(OrderDate, -2) = '18';
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))
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;
Count the number of orders made from the store in city with population of 3000000 to 4000000.
number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000
less need for products refers to Order Quantity = 1; purchased through a distributor refers to Sales Channel = 'Distributor'; 'Harri County' is the County
orders refer to OrderNumber;
orders refer to OrderNumber; more than 5 product quantities refer to Order Quantity > 5;
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); Joshua Bennett is the name of Sales Team;
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
all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;
Rochester Ltd is the name of the customer; orders refer to OrderNumber;
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;
List all the name of products with the ID of 30 to 40.
products with the ID of 30 to 40 refer to Product Name WHERE ProductID BETWEEN 30 AND 40;
average household income = Divide (Sum(Household Income), Count(City Name)); highest number of store refers to Max(Count(StoreID))
COUNT(StoreID) < COUNT(StoreID where Type = 'Borough') < COUNT(StoreID where Type = 'CDP');
DIVIDE(SUM(Order Quantity where Product Name = 'Ornaments' and OrderDate LIKE '%/18'), 12);
most populous country refers to Max(Population)
delivered in 2021 refer to DeliveryDate LIKE '%/21'; 'Sundial' is the Customer Names
Medsep Group is the name of the customer; orders refer to OrderNumber;
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';
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;
"Elorac, Corp" is the Customer Names