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】
    In customers with the first name of Erica, how many of them bought a quantity below 200? quantity below 200 refers to quantity < 200;

    【Evidence】
    quantity below 200 refers to quantity < 200;

    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 Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Erica' AND T1.Quantity < 200
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 products bought by Kathryn Ashe, what is the name of the product with 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 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 = 'Kathryn' AND T3.LastName = 'Ashe' 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】
    What is the price and quantity of the product named Seat Tube?

    【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 T2.Price, T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Seat Tube'
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 price and name of the product bought by Erica Xu?

    【Evidence】
    

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

SQL: SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu'
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 sales ID of the product with a quantity of 590 and named "External Lock Washer 7". External Lock Washer 7' is name of product;

    【Evidence】
    External Lock Washer 7' 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 T1.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'External Lock Washer 7' AND T1.Quantity = 590
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 ID between 30 and 40, who is the customer that bought a total quantity of 403? who refers to FirstName, LastName;

    【Evidence】
    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 T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity = 403 AND T1.SalesID BETWEEN 30 AND 40
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 customer's ID and last name of the customer that purchased a product with a quantity greater than 90% of the average quantity of all listed products. quantity greater than 90% of the average quantity = Quantity > MULTIPLY(AVG(Quantity), 0.9);

    【Evidence】
    quantity greater than 90% of the average quantity = Quantity > MULTIPLY(AVG(Quantity), 0.9);

    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.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales ) * 0.9
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 sales ID ranges from 1 to 200, what is the percentage of the products with a price ranging from 200 to 300? sales ID ranges from 1 to 200 refers to SalesID between 1 and 200; percentage = MULTIPLY(DIVIDE(SUM(Price between 200 and 300), COUNT(Price)), 1.0);

    【Evidence】
    sales ID ranges from 1 to 200 refers to SalesID between 1 and 200; percentage = MULTIPLY(DIVIDE(SUM(Price between 200 and 300), COUNT(Price)), 1.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(T2.Price BETWEEN 200 AND 300, 1, 0)) AS REAL) * 100 / COUNT(T2.Price) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SalesID BETWEEN 1 AND 200
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 name of the most expensive product? most expensive product refers to MAX(Price);

    【Evidence】
    most expensive product refers to MAX(Price);

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

SQL: SELECT Name FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )
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 customers are named Madison?

    【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(CustomerID) FROM Customers WHERE FirstName = 'Madison'
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 types of "HL Touring Frames" are there? types of HL Touring Frames refers to Name like '%HL Touring Frame%';

    【Evidence】
    types of HL Touring Frames refers to Name like '%HL Touring Frame%';

    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 Name LIKE '%HL Touring Frame%'
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 customers share the most common last name? most common last name refers to MAX(COUNT(LastName));

    【Evidence】
    most common last name refers to MAX(COUNT(LastName));

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

SQL: SELECT COUNT(CustomerID) FROM Customers GROUP BY LastName ORDER BY COUNT(LastName) 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】
    How many free or gift products are there? free gift refers to Price = 0;

    【Evidence】
    free gift 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 COUNT(ProductID) FROM Products WHERE 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】
    What is the name of the sales person who handled the highest number of sales? name of the sales person = FirstName, MiddleInitial, LastName; highest number of sales refers to MAX(COUNT(SalesID));

    【Evidence】
    name of the sales person = FirstName, MiddleInitial, LastName; highest number of sales refers to MAX(COUNT(SalesID));

    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.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T2.SalesPersonID = T1.EmployeeID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 1