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】
    What is the full name of employee who sold 1000 units? full name of employee = FirstName, MiddleInitial, LastName; units refers to quantity; Quantity = 100

    【Evidence】
    full name of employee = FirstName, MiddleInitial, LastName; units refers to quantity; Quantity = 100

    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.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000
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】
    Tally the product name and quantity of the first ten sales. first ten sales refers to SalesID BETWEEN 1 AND 10;

    【Evidence】
    first ten sales refers to SalesID BETWEEN 1 AND 10;

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

SQL: SELECT T3.Name, T2.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.SalesID BETWEEN 1 AND 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】
    What is the total sales amount for Reflector? total sales amount = SUM(MULTIPLY(Price, Quantity)); 'Reflector' is name of product;

    【Evidence】
    total sales amount = SUM(MULTIPLY(Price, Quantity)); 'Reflector' is 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 SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Reflector'
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】
    What is the best selling colour for HL Mountain Frame, 42? 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;

    【Evidence】
    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;

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

SQL: SELECT IIF(SUM(IIF(T1.Name = 'HL Mountain Frame - Silver, 42', T2.SalesID, 0)) - SUM(IIF(T1.Name = 'HL Mountain Frame - Black, 42', T2.SalesID, 0)) > 0, 'Silver', 'Black') 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】
    What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42? difference = SUBTRACT((Price WHERE Name = 'HL Mountain Frame - Black, 42'), (Price WHERE Name = 'HL Mountain Frame - Black, 42'));

    【Evidence】
    difference = SUBTRACT((Price WHERE Name = 'HL Mountain Frame - Black, 42'), (Price WHERE Name = 'HL Mountain Frame - Black, 42'));

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

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
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 number of sales closed by Michel E. DeFrance?

    【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.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance'
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】
    What is the average number of customers per sales person? average = DIVIDE(COUNT(CustomerID), COUNT(EmployeeID));

    【Evidence】
    average = DIVIDE(COUNT(CustomerID), COUNT(EmployeeID));

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

SQL: SELECT CAST(COUNT(T1.CustomerID) AS REAL) / COUNT(T3.EmployeeID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID
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 all customers handled by Innes E. del Castillo, how many have purchased Short-Sleeve Classic Jersey, L? Short-Sleeve Classic Jersey, L' is name of product;

    【Evidence】
    Short-Sleeve Classic Jersey, L' is 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 COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T3.FirstName = 'Innes' AND T3.LastName = 'del Castillo' AND T1.Name = 'Short-Sleeve Classic Jersey, L' AND T3.MiddleInitial = 'e'
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】
    Name the sales person who helped Elizabeth A. White to purchase Road-250 Black, 48. name of the sales person = FirstName, MiddleInitial, LastName; 'Road-250 Black, 48' is name of product;

    【Evidence】
    name of the sales person = FirstName, MiddleInitial, LastName; 'Road-250 Black, 48' is 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 DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID INNER JOIN Customers AS T4 ON T2.CustomerID = T4.CustomerID WHERE T4.MiddleInitial = 'A' AND T4.LastName = 'White' AND T1.Name = 'Road-250 Black, 48' AND T4.FirstName = 'Elizabeth'
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 sales people managed to sell Headlights - Weatherproof? Headlights - Weatherproof' is name of product

    【Evidence】
    Headlights - Weatherproof' is 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 COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Headlights - Weatherproof'
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 revenue produced through sales of HL Road Frame - Red, 56. revenue = MULTIPLY(SUM(Quantity, Price)); 'HL Road Frame - Red, 56' is name of product;

    【Evidence】
    revenue = MULTIPLY(SUM(Quantity, Price)); 'HL Road Frame - Red, 56' is 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 SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'HL Road Frame - Red, 56'
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 sales transactions were given by the customer named Joe L. Lopez? sales transactions refers to SalesID;

    【Evidence】
    sales transactions refers to SalesID;

    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.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Joe' AND T2.MiddleInitial = 'L' AND T2.LastName = 'Lopez'
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】
    Name the customers who received 'Touring Rim' as a free gift. name of the customer = FirstName, MiddleInitial, LastName; 'Touring Rim' is name of product;

    【Evidence】
    name of the customer = FirstName, MiddleInitial, LastName; 'Touring Rim' is 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 DISTINCT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.Name = 'Touring Rim' AND T3.Price = 0