Database schema:

CREATE TABLE "Customers" (
	"CustomerID" INTEGER NOT NULL -- example: ['2', '1'],
	"FirstName" TEXT NOT NULL -- example: ['Abby', 'Aaron'],
	"MiddleInitial" TEXT -- example: ['A', 'B'],
	"LastName" TEXT NOT NULL -- example: ['Bryant', 'Alexander'],
	PRIMARY KEY ("CustomerID")
)


CREATE TABLE "Employees" (
	"EmployeeID" INTEGER NOT NULL -- example: ['2', '1'],
	"FirstName" TEXT NOT NULL -- example: ['Reginald', 'Abraham'],
	"MiddleInitial" TEXT -- example: ['l', 'e'],
	"LastName" TEXT NOT NULL -- example: ['Blotchet-Halls', 'Bennet'],
	PRIMARY KEY ("EmployeeID")
)


CREATE TABLE "Products" (
	"ProductID" INTEGER NOT NULL -- example: ['2', '1'],
	"Name" TEXT NOT NULL -- example: ['Adjustable Race', 'Bearing Ball'],
	"Price" REAL -- example: ['1.6', '0.8'],
	PRIMARY KEY ("ProductID")
)


CREATE TABLE "Sales" (
	"SalesID" INTEGER NOT NULL -- example: ['2', '1'],
	"SalesPersonID" INTEGER NOT NULL -- example: ['5', '17'],
	"CustomerID" INTEGER NOT NULL -- example: ['1964', '10482'],
	"ProductID" INTEGER NOT NULL -- example: ['500', '306'],
	"Quantity" INTEGER NOT NULL -- example: ['500', '810'],
	PRIMARY KEY ("SalesID"), 
	CONSTRAINT fk_sales_employees FOREIGN KEY("SalesPersonID") REFERENCES "Employees" ("EmployeeID"),
	CONSTRAINT fk_sales_customers FOREIGN KEY("CustomerID") REFERENCES "Customers" ("CustomerID"),
	CONSTRAINT fk_sales_products FOREIGN KEY("ProductID") REFERENCES "Products" ("ProductID")
)

Question: Calculate the average quantity per sales from sales id 20 to 30.
Evidence: average quantity = AVG(Quantity); SalesID BETWEEN 20 AND 30;

SQL:
SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30