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: How many 2003 Harley-Davidson Eagle Drag Bikes were ordered?
Evidence: 2003 Harley-Davidson Eagle Drag Bikes refers to productName; how many ordered refers to COUNT(quantityOrdered);
SQL: SELECT SUM(t2.quantityOrdered) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productName = '2003 Harley-Davidson Eagle Drag Bike'
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 was the product with the highest unit price shipped?
Evidence: The highest unit price refers to MAX(priceEach); when shipped refers to shippedDate;
SQL: SELECT t1.shippedDate FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber ORDER BY t2.priceEach 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: How many motorcycles have been ordered in 2004?
Evidence: Motorcycles refer to productLine = 'motorcycles'; ordered in 2004 refers to year(orderDate) = 2004;
SQL: SELECT SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE t3.productLine = 'motorcycles' AND STRFTIME('%Y', t1.orderDate) = '2004'
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 order number of the customer whose credit card has a limit of 45300.
Evidence: Credit card does not have a limit refers to creditLimit = 45300;
SQL: SELECT t1.orderNumber FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.creditLimit = 45300
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 Which order was the most profitable, please list the customer name of the order and the profit of the order.
Evidence: Most profitable order can be computed as MAX(MULTIPLY(quantityOrdered, SUBTRACT(priceEach, buyPrice)).
SQL: SELECT t3.customerName, (t1.priceEach - t4.buyPrice) * 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 INNER JOIN products AS t4 ON t1.productCode = t4.productCode GROUP BY t3.customerName, t1.priceEach, t4.buyPrice, t1.quantityOrdered ORDER BY (t1.priceEach - t4.buyPrice) * 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: How many transactions payment made by customer that is lower than 10000. Group the result by year.
Evidence: Transactions payment lower than 10000 refer to COUNT(amount) < 1000; by year refers to YEAR(paymentDate)
SQL: SELECT STRFTIME('%Y', t1.paymentDate), COUNT(t1.customerNumber) FROM payments AS t1 WHERE t1.amount < 10000 GROUP BY STRFTIME('%Y', t1.paymentDate)
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: List out 3 best seller products during year 2003 with their total quantity sold during 2003.
Evidence: Best selling products refer to products with MAX(quantityOrdered); 2003 refers to year(orderDate) = 2003;
SQL: SELECT t3.productName, SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE STRFTIME('%Y', t1.orderDate) = '2003' GROUP BY t3.productName ORDER BY SUM(t2.quantityOrdered) 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: List out sale rep that has sold 1969 Harley Davidson Ultimate Chopper. List out their names and quantity sold throughout the year.
Evidence: 1969 Harley Davidson Ultimate Chopper refers to the name of the product; sale rep refers to employee; 2003 refers to year(orderDate) = 2003; quantity sold refers to quantityOrdered; their names refer to the name of customers; 
SQL: SELECT t5.firstName, t5.lastName, SUM(t2.quantityOrdered) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode INNER JOIN orders AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN customers AS t4 ON t3.customerNumber = t4.customerNumber INNER JOIN employees AS t5 ON t4.salesRepEmployeeNumber = t5.employeeNumber WHERE t1.productName = '1969 Harley Davidson Ultimate Chopper' GROUP BY t5.lastName, t5.firstName
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 are the sales representatives in New York City? List their full names.
Evidence: New York City refers to city = 'NYC'; sales representative refers to jobTitle = 'Sales Rep';
SQL: SELECT t1.lastName, t1.firstName FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t2.city = 'NYC' 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: Identify the customer and list down the country with the check number GG31455.
SQL: SELECT t2.customerName, t2.country FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.checkNumber = 'GG31455'
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 2001 Ferrari Enzo were ordered?
Evidence: 2001 Ferrari Enzo refers to productName;
SQL: SELECT SUM(t1.orderNumber) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t2.productName = '2001 Ferrari Enzo'
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 5 products has the lowest amount of orders? List the product names.
Evidence: The lowest amount of orders refers to MIN(quantityOrdered);
SQL: SELECT t2.productName FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode GROUP BY t2.productName ORDER BY SUM(t1.quantityOrdered) ASC LIMIT 5
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: List down the customer names with a disputed order status.
SQL: SELECT t1.customerName FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'Disputed'
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 countries from the USA have an In Process order status?
Evidence: country = 'USA'
SQL: SELECT COUNT(t2.orderNumber) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'On Hold' AND t1.country = 'USA'
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: Calculate the total price of shipped orders belonging to Land of Toys Inc. under the classic car line of products.
Evidence: SUM(MULTIPLY(quantityOrdered, priceEach)) where productLine = 'Classic Cars'; status = 'Shipped'; customername = 'Land of Toys Inc';
SQL: SELECT SUM(t3.priceEach * t3.quantityOrdered) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber INNER JOIN orderdetails AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN products AS t4 ON t3.productCode = t4.productCode WHERE t4.productLine = 'Classic Cars' AND t1.customerName = 'Land of Toys Inc.' AND t2.status = 'Shipped'
Database: restaurant
Tables: geographic, generalinfo, location
Columns (table index, column name): -1, *, 0, city, 0, county, 0, region, 1, id_restaurant, 1, label, 1, food_type, 1, city, 1, review, 2, id_restaurant, 2, street_num, 2, street_name, 2, city
Question: How many restaurants have not obtained a minimum of 3 in their reviews?
Evidence: have not obtained a minimum of 3 in review refers to review < 3
SQL: SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3
Database: restaurant
Tables: geographic, generalinfo, location
Columns (table index, column name): -1, *, 0, city, 0, county, 0, region, 1, id_restaurant, 1, label, 1, food_type, 1, city, 1, review, 2, id_restaurant, 2, street_num, 2, street_name, 2, city
Question: What types of food are served at the 4 top-reviewed restaurants?
Evidence: top-reviewed refers to review = 4; type of food refers to food_type


SQL: SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4
Database: restaurant
Tables: geographic, generalinfo, location
Columns (table index, column name): -1, *, 0, city, 0, county, 0, region, 1, id_restaurant, 1, label, 1, food_type, 1, city, 1, review, 2, id_restaurant, 2, street_num, 2, street_name, 2, city
Question: How many restaurants in the city of Richmond serve Mediterranean food?
Evidence: Mediterranean food refers to food_type =   'mediterranean'
SQL: SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond'
Database: restaurant
Tables: geographic, generalinfo, location
Columns (table index, column name): -1, *, 0, city, 0, county, 0, region, 1, id_restaurant, 1, label, 1, food_type, 1, city, 1, review, 2, id_restaurant, 2, street_num, 2, street_name, 2, city
Question: List all the cities in Sonoma County.
SQL: SELECT city FROM geographic WHERE county = 'sonoma county'