
CREATE TABLE list (
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Grade" INTEGER, 
	"Classroom" INTEGER, 
	PRIMARY KEY ("LastName", "FirstName")
)


CREATE TABLE teachers (
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Classroom" INTEGER, 
	PRIMARY KEY ("LastName", "FirstName")
)

CREATE TABLE list (
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Grade" INTEGER, 
	"Classroom" INTEGER, 
	PRIMARY KEY ("LastName", "FirstName")
)

/*
2 rows from list table:
LastName	FirstName	Grade	Classroom
CAR	 MAUDE	2	101
KRISTENSEN	 STORMY	6	112
*/


CREATE TABLE teachers (
	"LastName" TEXT, 
	"FirstName" TEXT, 
	"Classroom" INTEGER, 
	PRIMARY KEY ("LastName", "FirstName")
)

/*
2 rows from teachers table:
LastName	FirstName	Classroom
MACROSTIE	 MIN	101
COVIN	 JEROME	102
*/
For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.
SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade
[{'Grade': 0, 'count(DISTINCT classroom)': 3, 'count(*)': 16}, {'Grade': 1, 'count(DISTINCT classroom)': 2, 'count(*)': 12}, {'Grade': 2, 'count(DISTINCT classroom)': 1, 'count(*)': 3}, {'Grade': 3, 'count(DISTINCT classroom)': 1, 'count(*)': 6}, {'Grade': 4, 'count(DISTINCT classroom)': 3, 'count(*)': 12}, {'Grade': 5, 'count(DISTINCT classroom)': 1, 'count(*)': 8}, {'Grade': 6, 'count(DISTINCT classroom)': 1, 'count(*)': 3}]