QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Among the customers whose first name is Cameron, who bought the product in the most quantity? most quantity refers to MAX(Quantity); who refers to FirstName, LastName;

    【Evidence】
    most quantity refers to MAX(Quantity); who refers to FirstName, LastName;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Cameron' ORDER BY T2.Quantity DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Please provide sales ID for products named Hex Nut with a price greater than 100. price greater than 100 refers to price > 100;

    【Evidence】
    price greater than 100 refers to price > 100;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Hex Nut%' AND T1.Price > 100
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Identify customer IDs who bought products priced from 1000 to 2000. priced from 1000 to 2000 refers to Price BETWEEN 1000 AND 2000;

    【Evidence】
    priced from 1000 to 2000 refers to Price BETWEEN 1000 AND 2000;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 1000 AND 2000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Calculate the total quantity of products that are gifts. total quantity = SUM(Quantity); gifts refers to Price = 0;

    【Evidence】
    total quantity = SUM(Quantity); gifts refers to Price = 0;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price = 0
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Calculate the quantity percentage of the gift products in the total trading quantity. percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Price = 0), SUM(Quantity)), 1.0); gift products refers to Price = 0;

    【Evidence】
    percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Price = 0), SUM(Quantity)), 1.0); gift products refers to Price = 0;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(IIF(T1.Price = 0, T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity)FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Calculate the percentage of sold blades in the total number of transactions. percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Name = 'Blade'), SUM(Quantity)), 1.0); 'blades' refers to name of product;

    【Evidence】
    percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Name = 'Blade'), SUM(Quantity)), 1.0); 'blades' refers to name of product;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(IIF(T1.Name = 'Blade', T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    How many of the employees have the last name "Ringer" ?

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Among the products with product ID lower than 15, how many of them costs 10 and below? product ID lower than 15 refers to ProductID < 15; costs 10 and below refers to Price; Price < = 10;

    【Evidence】
    product ID lower than 15 refers to ProductID < 15; costs 10 and below refers to Price; Price < = 10;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Give the product's name brought by Aaron Alexander.

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.FirstName = 'Aaron' AND T3.LastName = 'Alexander'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500. highest prices refers to MAX(Price); quantity ranges from 400 to 500 refers to Quantity BETWEEN 400 AND 500;

    【Evidence】
    highest prices refers to MAX(Price); quantity ranges from 400 to 500 refers to Quantity BETWEEN 400 AND 500;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Among customers named Kate, who has the highest quantity? highest quantity refers to MAX(Quantity);

    【Evidence】
    highest quantity refers to MAX(Quantity);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Kate' ORDER BY T1.Quantity DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25? price ranges from 100 to 150 refers to Price BETWEEN 100 AND 150; quantity lower than 25 refers to Quantity < 25;

    【Evidence】
    price ranges from 100 to 150 refers to Price BETWEEN 100 AND 150; quantity lower than 25 refers to Quantity < 25;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    List the quantity and price of the product bought by Abigail Henderson.

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.Quantity, T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    In sales with a quantity of 60, how many of them have a price not greater than 500?

    【Evidence】
    

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity = 60 AND T1.Price <= 500