Chinastark/bird_dataset huggingface dataset:
Database: beer_factory
Note: Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's refers to brandname IN('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');
Question: List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.
SQL: SELECT rootbeer.rootbeerid FROM rootbeer INNER JOIN rootbeerbrand ON rootbeerbrand.brandid = rootbeer.brandid WHERE rootbeerbrand.brandname IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')
Database: beer_factory
Note: bottles refers to containertype = 'Bottle';
Question: How many bottles of beer have been bought by Jim Breech?
SQL: SELECT count(rootbeer.containertype) FROM customers INNER JOIN `transaction` ON transaction.customerid = customers.customerid INNER JOIN rootbeer ON rootbeer.rootbeerid = transaction.rootbeerid WHERE rootbeer.containertype = 'Bottle' AND customers.first = 'Jim' AND customers.last = 'Breech'
Database: beer_factory
Note: California refers to state = 'CA';
Question: How many transactions have been made to purchase a root beer brand from California?
SQL: SELECT count(transaction.rootbeerid) FROM rootbeerbrand INNER JOIN rootbeer ON rootbeerbrand.brandid = rootbeer.brandid INNER JOIN `transaction` ON rootbeer.rootbeerid = transaction.rootbeerid WHERE rootbeerbrand.state = 'CA'
Database: beer_factory
Note: average review = AVG(starrating); subscriber refers to subscribedtoemaillist = 'TRUE';
Question: What is the average review given by a subscriber?
SQL: SELECT avg(rootbeerreview.starrating) FROM customers INNER JOIN rootbeerreview ON customers.customerid = rootbeerreview.customerid WHERE customers.subscribedtoemaillist = 'TRUE'
Database: beer_factory
Note: difference = SUBTRACT(COUNT(containertype = 'Bottle' WHERE state = 'LA'), COUNT(containertype = 'Bottle' state = 'MO')); bottles refers to containertype = 'Bottle'; Louisiana refers to state = 'LA'; Missouri refers to state = 'MO';
Question: What is the amount difference between the bottles of root beer sold from Louisiana and Missouri?
SQL: SELECT ( SELECT count(rootbeer.brandid) FROM rootbeer INNER JOIN rootbeerbrand ON rootbeer.brandid = rootbeerbrand.brandid WHERE rootbeerbrand.state = 'LA' AND rootbeer.containertype = 'Bottle' ) - ( SELECT count(rootbeer.brandid) FROM rootbeer INNER JOIN rootbeerbrand ON rootbeer.brandid = rootbeerbrand.brandid WHERE rootbeerbrand.state = 'MO' AND rootbeer.containertype = 'Bottle' ) AS difference
Database: beer_factory
Note: transaction ratio = DIVIDE(SUM(transactionid WHERE locationname = 'Sac state American River Courtyard'), SUM(transactionid WHERE locationname = 'Sac state Union')); Sac state American River Courtyard refers to locationname = 'Sac state American River Courtyard'; Sac state Union refers to locationname = 'Sac state Union';
Question: What is the transaction ratio being made at Sac State American River Courtyard and Sac State Union?
SQL: SELECT cast(count(CASE WHEN LOCATION.locationname = 'Sac State American River Courtyard' THEN transaction.transactionid ELSE NULL END) AS REAL) * 100 / count(CASE WHEN LOCATION.locationname = 'Sac State Union' THEN transaction.transactionid ELSE NULL END) FROM `transaction` INNER JOIN LOCATION ON transaction.locationid = LOCATION.locationid
Database: beer_factory
Note: top 10 spenders refers to MAX(purchaseprice) LIMIT 10;
Question: List out the name of the top 10 spenders and what credit card type are they using.
SQL: SELECT customers.first, customers.last, transaction.creditcardtype FROM customers INNER JOIN `transaction` ON customers.customerid = transaction.customerid GROUP BY customers.customerid ORDER BY sum(transaction.purchaseprice) DESC LIMIT 10
Database: beer_factory
Note: root beer brand refers to brandname; not caffeinated refers to caffeinated = 'FALSE'; not containing cane sugar refers to canesugar = 'FALSE'; total amount sold = SUM(purchaseprice);
Question: List out root beer brand that is not caffeinated and not containing cane sugar. What is the total amount sold for this products?
SQL: SELECT rootbeerbrand.brandname, sum(transaction.purchaseprice) FROM rootbeerbrand INNER JOIN rootbeer ON rootbeerbrand.brandid = rootbeer.brandid INNER JOIN `transaction` ON rootbeer.rootbeerid = transaction.rootbeerid WHERE rootbeerbrand.canesugar = 'FALSE' AND rootbeerbrand.caffeinated = 'FALSE' GROUP BY rootbeerbrand.brandname
Database: beer_factory
Note: root beer brand refers to brandname; lowest purchase refers to MIN(COUNT(brandid));
Question: Which of the root beer brand have the lowest purchase?
SQL: SELECT rootbeerbrand.brandname FROM rootbeer INNER JOIN rootbeerbrand ON rootbeer.brandid = rootbeerbrand.brandid GROUP BY rootbeerbrand.brandid ORDER BY count(rootbeer.brandid) LIMIT 1
Database: beer_factory
Note: best seller root beer refers to MAX(COUNT(brandid)); average star rating = AVG(starrating);
Question: What is the best seller root beer brand and what is the average star rating for this root beer?
SQL: SELECT rootbeerreview.brandid, avg(rootbeerreview.starrating) FROM rootbeerreview INNER JOIN `transaction` ON rootbeerreview.customerid = transaction.customerid INNER JOIN rootbeerbrand ON rootbeerreview.brandid = rootbeerbrand.brandid GROUP BY rootbeerbrand.brandid ORDER BY count(rootbeerreview.brandid) DESC LIMIT 1
Database: beer_factory
Note: percentage difference = (DIVIDE(MULTIPLY(SUBTRACT(SUM(purchaseprice WHERE brandname = 'River city'), SUM(purchaseprice WHERE brandname = 'Frostie')), 100), SUM(purchaseprice WHERE brandname = 'Frostie'))); River city refers to brandname = 'River city'; Frostie refers to brandname = 'Frostie';
Question: What is the percentage difference of River City sale compare to Frostie?
SQL: SELECT cast((sum(CASE WHEN rootbeerbrand.brandname = 'River City' THEN transaction.purchaseprice ELSE 0 END) - sum(CASE WHEN rootbeerbrand.brandname = 'Frostie' THEN transaction.purchaseprice ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN rootbeerbrand.brandname = 'Frostie' THEN transaction.purchaseprice ELSE 0 END) FROM rootbeer INNER JOIN `transaction` ON rootbeer.rootbeerid = transaction.rootbeerid INNER JOIN rootbeerbrand ON rootbeer.brandid = rootbeerbrand.brandid
Database: beer_factory
Note: California refers to state = 'CA';
Question: Please name all of the cities in California.
SQL: SELECT DISTINCT city FROM customers WHERE state = 'CA'
Database: beer_factory
Note: percentage = MULTIPLY(DIVIDE(COUNT(customerid WHERE gender = 'F'), COUNT(customerid) WHERE subscribedtoemaillist = 'TRUE'), 1.0); female refers to gender = 'F'; subscribed to the email list refers to subscribedtoemaillist = 'TRUE';
Question: What is the percentage of female customers who subscribed to the email list?
SQL: SELECT cast(count(CASE WHEN gender = 'F' THEN 1 ELSE NULL END) AS REAL) * 100 / count(subscribedtoemaillist) FROM customers WHERE subscribedtoemaillist = 'TRUE'
Database: beer_factory
Note: type of card refers to creditcardtype;
Question: Which type of card did Dick Ruthven use to pay for all of his transactions?
SQL: SELECT DISTINCT transaction.creditcardtype FROM customers INNER JOIN `transaction` ON customers.customerid = transaction.customerid WHERE customers.first = 'Dick' AND customers.last = 'Ruthven'
Database: beer_factory
Note: Sac state Union refers to locationname = 'Sac state Union';
Question: How many transactions were made at Sac State Union?
SQL: SELECT count(transaction.transactionid) FROM `transaction` INNER JOIN LOCATION ON transaction.locationid = LOCATION.locationid WHERE LOCATION.locationname = 'Sac State Union'
Database: beer_factory
Note: stars refers to starrating; Frostie refers to brandname = 'Frostie';
Question: How many stars did Urijah Faber rate for Frostie?
SQL: SELECT rootbeerreview.starrating FROM customers INNER JOIN rootbeerreview ON customers.customerid = rootbeerreview.customerid INNER JOIN rootbeerbrand ON rootbeerreview.brandid = rootbeerbrand.brandid WHERE customers.first = 'Urijah' AND customers.last = 'Faber' AND rootbeerbrand.brandname = 'Frostie'
Database: beer_factory
Note: lowest star rating refers to MIN(starrating); "Too spicy!" review refers to review = 'Too Spicy!';
Question: Which brand has the lowest star rating with a "Too spicy!" review?
SQL: SELECT rootbeerbrand.brandname FROM rootbeerbrand INNER JOIN rootbeerreview ON rootbeerreview.brandid = rootbeerbrand.brandid WHERE rootbeerreview.starrating = 1 AND rootbeerreview.review = 'Too Spicy!'
Database: beer_factory
Note: Sac state American River Courtyard refers to locationname = 'Sac state American River Courtyard'; Master Card refers to creditcardtype = 'MasterCard';
Question: How many purchases were made at Sac State American River Courtyard using Master Card?
SQL: SELECT count(transaction.transactionid) FROM `transaction` INNER JOIN LOCATION ON transaction.locationid = LOCATION.locationid WHERE LOCATION.locationname = 'Sac State American River Courtyard' AND transaction.creditcardtype = 'MasterCard'
Database: beer_factory
Note: brand refers to brandname; in 2012 refers to reviewdate LIKE '2012%'; lowest star rating refers to MIN(starrating); contains cane sugar as well as honey refers to canesugar = 'TRUE' AND honey = 'TRUE';
Question: Which brand in 2012 has the lowest star rating and contains cane sugar as well as honey?
SQL: SELECT DISTINCT rootbeerbrand.brandname FROM rootbeerbrand INNER JOIN rootbeerreview ON rootbeerbrand.brandid = rootbeerreview.brandid WHERE rootbeerbrand.canesugar = 'TRUE' AND rootbeerbrand.honey = 'TRUE' AND rootbeerreview.starrating = 1 AND rootbeerreview.reviewdate LIKE '2012%'
Database: beer_factory
Note: precise location = latitude, longitude; in 2014 refers to transactiondate LIKE '2014%';
Question: What is the precise location of the place where Tommy Kono made a purchase in 2014?
SQL: SELECT DISTINCT geolocation.latitude, geolocation.longitude FROM geolocation INNER JOIN `transaction` ON transaction.locationid = geolocation.locationid INNER JOIN customers ON customers.customerid = transaction.customerid WHERE customers.first = 'Tommy' AND customers.last = 'Kono' AND transaction.transactiondate LIKE '2014%'
Database: beer_factory
Note: email address refers to email; transaction 100016 refers to transactionid = 100016;
Question: What is the email address of the customer who made a purchase in transaction 100016?
SQL: SELECT customers.email FROM customers INNER JOIN `transaction` ON customers.customerid = transaction.customerid WHERE transaction.transactionid = '100016'
Database: beer_factory
Note: bottle of beer refers to containertype = 'Bottle'; American Express refers to creditcardtype = 'American Express';
Question: How many transactions were made to purchase a bottle of beer using American Express?
SQL: SELECT count(rootbeer.rootbeerid) FROM rootbeer INNER JOIN `transaction` ON rootbeer.rootbeerid = transaction.rootbeerid WHERE rootbeer.containertype = 'Bottle' AND transaction.creditcardtype = 'American Express'
Database: beer_factory
Note: location refers to locationname; bottle of beer refers to containertype = 'Bottle'; location that sold more bottles of beer refers to MAX(COUNT(locationid WHERE containertype = 'Bottle'));
Question: Which location sold more bottles of beer?
SQL: SELECT LOCATION.locationname FROM rootbeer INNER JOIN LOCATION ON rootbeer.locationid = LOCATION.locationid WHERE rootbeer.containertype = 'Bottle' GROUP BY LOCATION.locationid ORDER BY count(rootbeer.locationid) DESC LIMIT 1
Database: beer_factory
Note: root beer brands refers to brandname; highest market evaluation and acceptance refers to MAX(COUNT(starrating = 5));
Question: Please name any three root beer brands that have the highest market evaluation and acceptance.
SQL: SELECT DISTINCT rootbeerbrand.brandname FROM rootbeerbrand INNER JOIN rootbeerreview ON rootbeerbrand.brandid = rootbeerreview.brandid WHERE rootbeerreview.starrating = 5 LIMIT 3
Database: beer_factory
Note: precise location = latitude, longitude; Sac state American River Courtyard refers to locationname = 'Sac state American River Courtyard';
Question: What is the precise location of the Sac State American River Courtyard?
SQL: SELECT geolocation.latitude, geolocation.longitude FROM LOCATION INNER JOIN geolocation ON LOCATION.locationid = geolocation.locationid WHERE LOCATION.locationname = 'Sac State American River Courtyard'
Database: sales
Question: How many sales ids are there for customer id 80?
SQL: SELECT count(salesid) FROM sales WHERE customerid = 80
Database: sales
Note: sales from id 1 to 10 refers to salesid BETWEEN 1 AND 10;
Question: Count the total quantity for sales from id 1 to 10.
SQL: SELECT sum(quantity) FROM sales WHERE salesid BETWEEN 1 AND 10
Database: sales
Note: average quantity = AVG(quantity); salesid BETWEEN 20 AND 30;
Question: Calculate the average quantity per sales from sales id 20 to 30.
SQL: SELECT avg(quantity) FROM sales WHERE salesid BETWEEN 20 AND 30
Database: sales
Note: highest quantity refers to MAX(quantity);
Question: List down the product id for products with the highest quantity.
SQL: SELECT DISTINCT productid FROM sales WHERE quantity = ( SELECT max(quantity) FROM sales )
Database: sales
Note: lowest price refers to MIN(price);
Question: How many product ids have the lowest price?
SQL: SELECT count(DISTINCT productid) FROM products WHERE price = ( SELECT max(price) FROM products )
Database: sales
Note: free gifts refers to price = 0;
Question: List down product names of free gifts.
SQL: SELECT name FROM products WHERE price = 0
Database: sales
Note: products from id 1 to 10 refers to productid BETWEEN 1 AND 10;
Question: List down the product name for products from id 1 to 10.
SQL: SELECT name FROM products WHERE productid BETWEEN 1 AND 10
Database: sales
Note: lowest quantity refers to MIN(quantity);
Question: What is the name of the product with the lowest quantity?
SQL: SELECT products.name FROM sales INNER JOIN products ON sales.productid = products.productid ORDER BY sales.quantity LIMIT 1
Database: sales
Note: Hex Nut 9' is name of product;
Question: How many customer ids have purchased Hex Nut 9?
SQL: SELECT count(sales.customerid) FROM sales INNER JOIN products ON sales.productid = products.productid WHERE products.name = 'Hex Nut 9'
Database: sales
Note: Flat Washer 8' is name of product;
Question: Calculate the total sales ids that were sales of Flat Washer 8.
SQL: SELECT count(sales.salesid) FROM sales INNER JOIN products ON sales.productid = products.productid WHERE products.name = 'Flat Washer 8'
Database: sales
Note: id refers to salespersonid; salespersonid = 10;
Question: List down all of the product names that were placed by sales person with id 10.
SQL: SELECT DISTINCT products.name FROM products INNER JOIN sales ON products.productid = sales.productid WHERE sales.salespersonid = 10
Database: sales
Question: List down the first name of customers who placed order for product id 1.
SQL: SELECT customers.firstname FROM customers INNER JOIN sales ON customers.customerid = sales.customerid INNER JOIN products ON sales.productid = products.productid WHERE sales.productid = 1
Database: sales
Question: What is the last name of the customer who placed an order for sales id 178?
SQL: SELECT customers.lastname FROM customers INNER JOIN sales ON customers.customerid = sales.customerid WHERE sales.salesid = 178
Database: sales
Question: List down product ids that were purchased by customers called Abby.
SQL: SELECT DISTINCT sales.productid FROM sales INNER JOIN customers ON sales.customerid = customers.customerid WHERE customers.firstname = 'Abby'
Database: sales
Question: Write down all of the product ids that were placed by Meander.
SQL: SELECT DISTINCT sales.productid FROM employees INNER JOIN sales ON employees.employeeid = sales.salespersonid WHERE employees.firstname = 'Meander'
Database: sales
Question: What is the last name of sales person for sales id 100?
SQL: SELECT employees.lastname FROM employees INNER JOIN sales ON employees.employeeid = sales.salespersonid WHERE sales.salesid = 100
Database: sales
Question: What is the first name of employee who handled sales for customer called Abigail?
SQL: SELECT DISTINCT employees.firstname FROM customers INNER JOIN sales ON customers.customerid = sales.customerid INNER JOIN employees ON sales.salespersonid = employees.employeeid WHERE customers.firstname = 'Abigail'
Database: sales
Note: free gifts refers to price = 0;
Question: How many free gifts have customer with id 11782 received?
SQL: SELECT count(products.productid) FROM products INNER JOIN sales ON products.productid = sales.productid WHERE sales.customerid = 11782 AND products.price = 0
Database: sales
Note: full name = firstname, middleinitial, lastname;
Question: What is the full name of customers who dealt with sales person with id 5?
SQL: SELECT customers.firstname, customers.middleinitial, customers.lastname FROM customers INNER JOIN sales ON customers.customerid = sales.customerid WHERE sales.salespersonid = 5
Database: sales
Note: first name starting with alphabet "s" refers to firstname LIKE 's%';
Question: List down all of the sales IDs for sales handled by sales people with first name starting with alphabet "s".
SQL: SELECT sales.salesid FROM sales INNER JOIN employees ON sales.salespersonid = employees.employeeid WHERE substr(employees.firstname, 1, 1) = 's'
Database: sales
Note: IDs from 1 to 100 refers to customerid BETWEEN 1 AND 100 ; highest price refers to MAX(price);
Question: Among customers with IDs from 1 to 100, what is the highest price of products they purchased?
SQL: SELECT products.price FROM products INNER JOIN sales ON products.productid = sales.productid WHERE sales.customerid BETWEEN 1 AND 100 ORDER BY products.price DESC LIMIT 1
Database: sales
Note: highest quantity refers to MAX(quantity);
Question: Among customers with the last name of Valdez, who purchased the highest quantity?
SQL: SELECT customers.firstname FROM customers INNER JOIN sales ON customers.customerid = sales.customerid WHERE customers.lastname = 'Valdez' ORDER BY sales.quantity DESC LIMIT 1
Database: sales
Note: SUM = ADD(SUM(salesid WHERE firstname = 'Morningstar'), SUM(salesid WHERE firstname = 'Heather'), SUM(salesid WHERE firstname = 'Dean'));
Question: Sum up the number sales ids handled by employees called Morningstar, Heather and Dean.
SQL: SELECT sum(iif(employees.firstname = 'Morningstar', 1, 0)) + sum(iif(employees.firstname = 'Heather', 1, 0)) + sum(iif(employees.firstname = 'Dean', 1, 0)) AS num FROM sales INNER JOIN employees ON sales.salespersonid = employees.employeeid
Database: sales
Note: WHEN productid = 498 AND firstname = 'Alex' means that Alex purchased a product; WHEN productid = 498 AND firstname NOT 'Alex' means Alex has not purchased a product;
Question: Has Alex purchased product with id 498?
SQL: SELECT iif(sales.productid = 498, 'YES', 'NO') FROM sales INNER JOIN customers ON sales.customerid = customers.customerid WHERE customers.firstname = 'Alex'
Database: sales
Note: total price = SUM(MULTIPLY(price, quantity));
Question: Calculate the total price of products purchased by Adam.
SQL: SELECT sum(products.price * sales.quantity) FROM customers INNER JOIN sales ON customers.customerid = sales.customerid INNER JOIN products ON sales.productid = products.productid WHERE customers.firstname = 'Adam'
Database: sales
Note: total price = SUM(MULTIPLY(price, quantity)); from id 400 to 500 refers to productid BETWEEN 400 AND 500;
Question: Calculate the total price for products from id 400 to 500.
SQL: SELECT sum(products.price * sales.quantity) FROM products INNER JOIN sales ON products.productid = sales.productid WHERE products.productid BETWEEN 400 AND 500
Database: sales
Note: name starting with alphabet "c" refers to name LIKE 'C%';
Question: Calculate the total quantity of products with name starting with alphabet "c".
SQL: SELECT sum(sales.quantity) FROM products INNER JOIN sales ON products.productid = sales.productid WHERE substr(products.name, 1, 1) = 'C'
Database: sales
Question: Calculate the total quantity of products purchased by customer called Adrian.
SQL: SELECT sum(sales.quantity) FROM customers INNER JOIN sales ON customers.customerid = sales.customerid WHERE customers.firstname = 'Adam'
Database: sales
Note: top 5 products in terms of price refers to MAX(price) LIMIT 5;
Question: List the product ID of the top five products, by descending order, in terms of price.
SQL: SELECT productid FROM products ORDER BY price DESC LIMIT 5
Database: sales
Note: freebies refers to price = 0;
Question: Among the products, how many of them are freebies?
SQL: SELECT count(productid) FROM products WHERE price = 0
Database: sales
Note: quantity is more than 950 refers to quantity > 950;
Question: Write down the name of products whose sale quantity is more than 950.
SQL: SELECT DISTINCT products.name FROM products INNER JOIN sales ON products.productid = sales.productid WHERE sales.quantity > 950
Database: sales
Note: full name of employee = firstname, middleinitial, lastname; units refers to quantity; quantity = 100;
Question: What is the full name of employee who sold 1000 units?
SQL: SELECT DISTINCT employees.firstname, employees.middleinitial, employees.lastname FROM sales INNER JOIN employees ON sales.salespersonid = employees.employeeid WHERE sales.quantity = 1000
Database: sales
Note: first ten sales refers to salesid BETWEEN 1 AND 10;
Question: Tally the product name and quantity of the first ten sales.
SQL: SELECT products.name, sales.quantity FROM customers INNER JOIN sales ON customers.customerid = sales.customerid INNER JOIN products ON sales.productid = products.productid WHERE sales.salesid BETWEEN 1 AND 10
Database: sales
Note: total sales amount = SUM(MULTIPLY(price, quantity)); 'Reflector' is name of product;
Question: What is the total sales amount for Reflector?
SQL: SELECT sum(products.price * sales.quantity) FROM products INNER JOIN sales ON products.productid = sales.productid WHERE products.name = 'Reflector'
Database: sales
Note: best selling colour refers to name of product with higher total sales; SUM(salesid WHERE name = 'HL Mountain Frame - Silver, 42') > SUM(name = 'HL Mountain Frame - Black, 42') means Silver is the best selling colour, otherwise Black is the best seling colour;
Question: What is the best selling colour for HL Mountain Frame, 42?
SQL: SELECT iif(sum(iif(products.name = 'HL Mountain Frame - Silver, 42', sales.salesid, 0)) - sum(iif(products.name = 'HL Mountain Frame - Black, 42', sales.salesid, 0)) > 0, 'Silver', 'Black') FROM products INNER JOIN sales ON products.productid = sales.productid
Database: sales
Note: difference = SUBTRACT((price WHERE name = 'HL Mountain Frame - Black, 42'), (price WHERE name = 'HL Mountain Frame - Black, 42'));
Question: What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42?
SQL: SELECT ( SELECT price FROM products WHERE name = 'HL Mountain Frame - Black, 42' ) - ( SELECT price FROM products WHERE name = 'LL Mountain Frame - Black, 42' ) AS num
Database: sales
Question: Calculate the total number of sales closed by Michel E. DeFrance?
SQL: SELECT count(sales.salesid) FROM sales INNER JOIN employees ON sales.salespersonid = employees.employeeid WHERE employees.firstname = 'Michel' AND employees.middleinitial = 'e' AND employees.lastname = 'DeFrance'
Database: sales
Note: average = DIVIDE(COUNT(customerid), COUNT(employeeid));
Question: What is the average number of customers per sales person?
SQL: SELECT cast(count(customers.customerid) AS REAL) / count(employees.employeeid) FROM customers INNER JOIN sales ON customers.customerid = sales.customerid INNER JOIN employees ON sales.salespersonid = employees.employeeid
Database: sales
Note: Short-Sleeve Classic Jersey, L' is name of product;
Question: Among all customers handled by Innes E. del Castillo, how many have purchased Short-Sleeve Classic Jersey, L?
SQL: SELECT count(sales.customerid) FROM products INNER JOIN sales ON products.productid = sales.productid INNER JOIN employees ON sales.salespersonid = employees.employeeid WHERE employees.firstname = 'Innes' AND employees.lastname = 'del Castillo' AND products.name = 'Short-Sleeve Classic Jersey, L' AND employees.middleinitial = 'e'