1sf/bird-sql-train-with-schema huggingface dataset:
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: For the product No. S18_3482 in the Order No.10108, how much discount did the customer have?
Evidence: DIVIDE(SUBTRACT(MSRP, priceEach)), MSRP); product No. S18_3482 refers to productCode = 'S18_3482'
SQL: SELECT (t1.MSRP - t2.priceEach) / t1.MSRP FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productCode = 'S18_3482' AND t2.orderNumber = '10108'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: To whom does Steve Patterson report? Please give his or her full name.
Evidence: reportsTO' is the leader of the 'employeeNumber';
SQL: SELECT t2.firstName, t2.lastName FROM employees AS t1 INNER JOIN employees AS t2 ON t2.employeeNumber = t1.reportsTo WHERE t1.firstName = 'Steve' AND t1.lastName = 'Patterson'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: How do I contact the President of the company?
Evidence: President refers to the jobTitle;
SQL: SELECT t.email FROM employees t WHERE t.jobTitle = 'President'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Who is the sales representitive of Muscle Machine Inc? Please give the employee's full name.
Evidence: Sales representative refers to jobTitle = 'Sales Rep'; Muscle Machine Inc is name of customer;
SQL: SELECT t2.firstName, t2.lastName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: If I'm from the Muscle Machine Inc, to which e-mail adress should I write a letter if I want to reach the superior of my sales representitive?
Evidence: Muscle Machine Inc is name of customer; superior refers to 'reportsTO', who is the leader of the 'employeeNumber'
SQL: SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Please list all the customers that have Steve Patterson as their sales representitive.
Evidence: Steve Patterson is an employee;
SQL: SELECT t1.customerName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Steve' AND t2.lastName = 'Patterson'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: How many customers have an employee who reports to William Patterson as their sales representitive?
Evidence: reportsTO' is the leader of the 'employeeNumber';
SQL: SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'William' AND t2.lastName = 'Patterson'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Please list the phone numbers of the top 3 customers that have the highest credit limit and have Leslie Jennings as their sales representitive.
SQL: SELECT t1.phone FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Leslie' AND t2.lastName = 'Jennings' ORDER BY t1.creditLimit DESC LIMIT 3
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: How many sales representitives are based in the offices in the USA?
Evidence: Sales representative refers to jobTitle = 'Sales Rep'; country = 'USA';
SQL: SELECT COUNT(t1.employeeNumber) FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t2.country = 'USA' AND t1.jobTitle = 'Sales Rep'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Where can I find the office of the President of the company?
Evidence: Where can I find the office refers to address, comprising of addressLine1 and addressLine2; President is a jobTitle
SQL: SELECT t2.addressLine1, t2.addressLine2 FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t1.jobTitle = 'President'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: What's the postal code of the office the VP Sales is at?
Evidence: VP Sales refers to jobTitle
SQL: SELECT t2.postalCode FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t1.jobTitle = 'VP Sales'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: What is the total price of the order made by Cruz & Sons Co. on 2003/3/3?
Evidence: SUM(MULTIPLY(quantityOrdered, priceEach)) where orderDate = '2003-03-03'; customerName = 'Cruz & Sons Co.'
SQL: SELECT SUM(t1.priceEach * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Which product did Cruz & Sons Co. order on 2003/3/3?
Evidence: Cruz & Sons Co. is name of customer; 2003/3/3 refers to orderDate;
SQL: SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Which product did Cruz & Sons Co. ask for the biggest amount in a single order?
Evidence: Cruz & Sons Co. is name of customer; the biggest amount refers to MAX(quantityOrdered).
SQL: SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' ORDER BY t1.priceEach * t1.quantityOrdered DESC LIMIT 1
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: When were the products ordered by Cruz & Sons Co. on 2003-03-03 shipped?
Evidence: Cruz & Sons Co. is name of customer; ordered on 2003-03-03 refers to orderDate;
SQL: SELECT t1.shippedDate FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Cruz & Sons Co.' AND t1.orderDate = '2003-03-03'
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: What is the amount of customers of 1957 Chevy Pickup by customers in a month?
SQL: SELECT COUNT(T2.customerNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.productCode IN ( SELECT productCode FROM products WHERE productName = '1957 Chevy Pickup' )
Database: car_retails
Tables: offices, employees, customers, orders, payments, productlines, products, orderdetails
Columns (table index, column name): -1, *, 0, officeCode, 0, city, 0, phone, 0, addressLine1, 0, addressLine2, 0, state, 0, country, 0, postalCode, 0, territory, 1, employeeNumber, 1, lastName, 1, firstName, 1, extension, 1, email, 1, officeCode, 1, reportsTo, 1, jobTitle, 2, customerNumber, 2, customerName, 2, contactLastName, 2, contactFirstName, 2, phone, 2, addressLine1, 2, addressLine2, 2, city, 2, state, 2, postalCode, 2, country, 2, salesRepEmployeeNumber, 2, creditLimit, 3, orderNumber, 3, orderDate, 3, requiredDate, 3, shippedDate, 3, status, 3, comments, 3, customerNumber, 4, customerNumber, 4, checkNumber, 4, paymentDate, 4, amount, 5, productLine, 5, textDescription, 5, htmlDescription, 5, image, 6, productCode, 6, productName, 6, productLine, 6, productScale, 6, productVendor, 6, productDescription, 6, quantityInStock, 6, buyPrice, 6, MSRP, 7, orderNumber, 7, productCode, 7, quantityOrdered, 7, priceEach, 7, orderLineNumber
Question: Name the product from the 'Classic Cars' production line that has the greatest expected profit.
Evidence: The greatest expected profit refers to MAX(SUBTRACT(MSRP, buyPrice);
SQL: SELECT t.productName, t.MSRP - t.buyPrice FROM products AS t WHERE t.productLine = 'Classic Cars' ORDER BY t.MSRP - t.buyPrice DESC LIMIT 1