query
stringlengths
24
325
positive
stringlengths
1
580
negative
stringlengths
1
580
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
active status of employees refers to CurrentFlag = 1;
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
thumbnail photo file refers to ThumbnailPhotoFileName;
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
business along with their IDs = BusinessEntityID; Cellphones refers to PhoneNumberType.name = ‘cell’
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
business id refers to BusinessEntityID;
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
home manufactured refers to MakeFlag = 1; average rating = divide(sum(Rating), count(ProductReview))
Which geographic area does the city with the second lowest tax rate belongs to? Indicate the name of the state or province as well.
geographic area to which the city belong refers to Group;
business id refers to BusinessEntityID
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
High quality refers to the product's quality class, therefore Class = 'H'; the lowest transacted quantity refers to Quantity = 1
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
shipment by truck refers to Name = 'XRQ - TRUCK GROUND';
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
Married refers to MaritalStatus = 'M';  non-sales employees refer to PersonType = 'EM'
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
vendor's selling price refers to StandardPrice
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
married refers to MaritalStatus = 'M'; western name style refers to NameStyle = 0; store contact refers to PersonType = 'SC'; probability = Divide (Count (BusinessEntityID( PersonType = 'SC' & MaritalStatus = 'M')), Count (BusinessEntityID ( PersonType) & MariatlStatus = 'M'))
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
proportion = DIVIDE(SUM(Name = 'UK')), (COUNT(SalesOrderID))) as count;
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
Profit as 82.41 = SUTRACT(ListPrice, StandardCost); May of 2012 refers to StartDate = '2012-05'
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
percentage of profit = DIVIDE(SUBTRACT(ListPrice, StandardCost), (StandardCost)) as percentage;
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
company number 1 refers to BusinessEntityId = 1; employee refers to PersonType = 'EM'; full name refers to FirstName + MiddleName + LastName
Among the employees whose pay frequencies are the highest, how many of them are married?
married refers to MaritalStatus = M; highest pay frequency refers to PayFrequency = 2
least amount of workers refers to MIN(count(DepartmentID));
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
Complete sales task refers to meeting sales quota; if Bonus = 0, it means this salesperson doesn't meet quota and vice versa
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
percentage of sales representatives = divide(count(JobTitle = 'Sales Representative'), count(JobTitle))*100%
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
SC is an abbreviation for Store Contact; store contact person refers to PersonType = 'SC'; recently hired refers to latest StartDate;
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
highest rating refers to Rating = 5; profit = SUBTRACT(ListPrice, StandardCost);
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
married employee refers to MaritalStatus = 'M'; less than 20 vacation hours refers to VacationHours<20
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
MOQ refers to minimum order quantity; MOQ of 1 refers to MinOrderQty = 1; standard cost more than 48 refers to StandardCost > 48;
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
where the person live refers addresstype.Name = 'Home'
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
cost refers to StandardCost;
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
more than 10 sick leave hours refers to SickLeaveHours>10; pay rate over 35 refers to Rate>35;
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
CurrentFlag = 1 refers to the active status of employees; Percentage = Divide (Count (BusinessEntityID (CurrentFlag = 1 & VacationHours >20 & SickLeaveHours > 10)), Count (BusinessEntityID (CurrentFlag = 1 & SickLeaveHours>10))) * 100;
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
non-sales employee refers to PersonType = 'EM'
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
shipment by truck refers to Name = 'XRQ - TRUCK GROUND';
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
least number of sick leave refers to min(SickLeaveHours); PayFrequency = 1 means ‘Salary received monthly’; PayFrequency = 2 means ‘Salary received biweekly';
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
Alex refers to FirstName = 'Alex'; single refers to MaritalStatus = 'S'
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
vendor's selling price refers to StandardPrice
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
hired in 2009 refers to year(HireDate) = 2009
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
male refers to Gender = 'M'; employee refers to PersonType = 'EM'; percentage = DIVIDE(COUNT(Gender = 'M'), COUNT(PersonType = 'MY'))*100%;
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
job position and job title are synonyms; full name = FirstName+MiddleName+LastName;
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
Product with the lowest rating refers to the rating given by the reviewer where Rating = 1
Among the sales with a tax applied to retail transaction, how many of them are charged by multiple types of taxes?
tax applied to retail transaction refers to Taxtype = 1; sales that are charged with multiple types of tax refers to NAME LIKE '%+%';
salesperson that haven't met the quota refers to Bonus = 0;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
CurrentFlag = 1 refers to the active status of employees; Percentage = Divide (Count (BusinessEntityID (CurrentFlag = 1 & VacationHours >20 & SickLeaveHours > 10)), Count (BusinessEntityID (CurrentFlag = 1 & SickLeaveHours>10))) * 100;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
Facilities Manager is a job title
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
Vendor's selling price of a single product refers to UnitPrice;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
store contact refers to PersonType = 'SC'; year(EndDate)>2007 and year(StartDate)<2007;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
goods refers to products
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
handling damage is descrription of manufacturing failure which refers to ScrapReason.Name
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
Started selling in 2013 refers to year(SellStartDate) = 2013;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
number of product rejected refers to ScrapedQty; trim length that is too long refers to scrap reason where Name = 'Trim length too long'
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
card that expires in 2007 refers to ExpYear = 2007;
Among the employees born before 1980 , how many of them are single?
BirthDate<'1980-01-01'; single refers to MaritalStatus = 'S' or null;
low class refers to Class = 'L'; universal refers to Style = 'U'; road frame is a name of product subcategory; average profit = AVG(SUBTRACT(ListPrice, StandardCost);
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
United States refers to CountryRegionCode = 'US';
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
employee number 257 refers to EmployeeID = 257; pending shipment status refers to Status = 3
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
Sales and Marketing is group name of a department
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
288th sales person refers to BusinessEntityID = 288; predited annual sales refers to SalesQuota; actual sales refers to SalesYTD; difference = Substract(SalesQuota(BusinessEntityID(288))), (SalesYTD(BusinessEntityID(288)));
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
cost refers to StandardCost;
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
Employees who do not wish to receive any e-mail promotions are marked as EmailPromotion = 0
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
Down Tube is a name of a product;
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
assembly lines that are not finished refers to EndDate = null
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
projected yearly sales quota refers to SalesQuota; projected yearly sales quota in 2013 refers to year(QuotaDate) = 2013; percentage = (MULTIPLY(DIVIDE(SUM(Bonus)), (SUM(SalesQuota))) as percentage;
How many products with the id "989" were sold in August 2013?
TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder;
Hex Nut 5 is name of a product
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
percentage = DIVIDE(SUM(Name = 'Night')), (COUNT(ShiftID)) as percentage;
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
Sales people refer to PersonType = 'SP'; projected yearly sales refers to SalesQuota
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
Canada is name of sales territory
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
active status of employees refers to CurrentFlag = 1;
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
salable product refers to FinishedGoodsFlag = 1; over 10 reviews refers to count(comments)>10
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
Purchase order with order quantity of 5000 or more refers to OrderQty> = 5000
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
price refers to ListPrice; highest price refers to MAX(ListPrice);
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
full name = FirstName+MiddleName+LastName;
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null; manufactured in house refers to MakeFlag = 1
How many products that take more than 2 days to make are out of stock?
take more than 2 days to make refers to DaysToManufacture>2; out of stock refers to OnOrderQty = 0 or OnOrderQty is null
married refers to MaritalStatus = 'M'; male refers to Gender = 'M'; BirthDate < = '1959-12-31';
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
approved refers to Status = 2; confidential document refers to DocumentSummary is null;
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
full name = FirstName+MiddleName+LastName; HiredDate refers to the date the person joins the company;
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
percentage = DIVIDE(Culture.Name = 'Thai', count(ALL Culture.Name))*100%
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
Purchase order with order quantity of 5000 or more refers to OrderQty> = 5000
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
year of credit card expiration refers to ExpYear;
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
Profit as 82.41 = SUTRACT(ListPrice, StandardCost); May of 2012 refers to StartDate = '2012-05'
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
Sales people refer to PersonType = 'SP'; projected yearly sales refers to SalesQuota
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
salesperson that haven't met the quota refers to Bonus = 0;
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
least amount of workers refers to MIN(count(DepartmentID));
Among all the products that are manufactured in-house, how many of them are salable?
product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1;
job position and job title are synonyms; full name = FirstName+MiddleName+LastName;
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
salable product refers to FinishedGoodsFlag = 1; mountain product line refers to ProductLine = 'M'
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
Debur and Polish is name of manufacturing location
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
geographic area to which the city belong refers to Group;
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
website purchasing link refers to PurchasingWebServiceURL
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
manufactured in house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1; over 10 reviews refers to count(comments)>10
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
Oldest employee refers to Max ( Subtract((now())-BirthDate));
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
least number of sick leave refers to min(SickLeaveHours); PayFrequency = 1 means ‘Salary received monthly’; PayFrequency = 2 means ‘Salary received biweekly';
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
Department refers to Name where GroupName = 'Executive General and Administration'
Who is the oldest married male? State his job title.
Male refers to Gender = 'M'; married refers to MaritalStatus = 'M'; oldest refers to Min(BirthDate);
profit on net = subtract(LastReceiptCost, StandardPrice); best profit on net refers to max(subtract(LastReceiptCost, StandardPrice))
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
Profit = SUBTRACT(ListPrice, StandardCost); the highest rating in review refers to Rating = 5
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
male refers to Gender = 'M'; female refers to Gender = 'F'; difference in average rate = DIVIDE(AVG(Rate where Gender = 'F')), (AVG(Rate where Gender = 'M'))) as diff;
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
still need to be assembled means the assembly doesn't finish or still going on which refers to EndDate IS NULL; a depth of 2 refers to BOMLevel = 2;
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
manufactured in house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1; over 10 reviews refers to count(comments)>10
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
profit = SUBTRACT(ListPrice, StandardCost);
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
geographical location refers to group from SalesPerson; ComissionPct refers to commission percentage where ComissionPct > = 0.018;
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
current payrate refers to max(Rate); percentage increment = divide(subtract(max(Rate), min(Rate)), min(Rate))*100%
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
SUBTRACT(LastReceiptCost, StandardPrice) for ProductID where name = 'Freewheel'
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
percentage of profit = DIVIDE(SUBTRACT(ListPrice, StandardCost), (StandardCost)) as percentage;
Please list the titles of the documents that are pending approval.
documents pending approval refers to Status = 1
CurrentFlag = 1 refers to the active status of employees; Percentage = Divide (Count (BusinessEntityID (CurrentFlag = 1 & VacationHours >20 & SickLeaveHours > 10)), Count (BusinessEntityID (CurrentFlag = 1 & SickLeaveHours>10))) * 100;
Sum the total number of products rejected for having a trim length that is too long.
number of product rejected refers to ScrapedQty; trim length that is too long refers to scrap reason where Name = 'Trim length too long'
Bike refers to the name of the product category, therefore ProductCategoryID = 1
Sum the total number of products rejected for having a trim length that is too long.
number of product rejected refers to ScrapedQty; trim length that is too long refers to scrap reason where Name = 'Trim length too long'
Northwest is name of SalesTerritory; US is the CountryRegionCode;
Sum the total number of products rejected for having a trim length that is too long.
number of product rejected refers to ScrapedQty; trim length that is too long refers to scrap reason where Name = 'Trim length too long'
located in the Subassembly category refers to Name = 'Subassembly'
Sum the total number of products rejected for having a trim length that is too long.
number of product rejected refers to ScrapedQty; trim length that is too long refers to scrap reason where Name = 'Trim length too long'
Transactiontype = 'w' means 'WorkOrder'; transactiontype = 's' means 'SalesOrder'; transactiontype = 'P' means 'PurchaseOrder'; happened in refers to TransactionDate