human
Schema:
list (LastName, FirstName, Grade, Classroom)
teachers (LastName, FirstName, Classroom)
Please answer with SQL.
assistant
Sure, I understand.
human
what is the average of grades?
assistant
SELECT AVG ( Grade ) FROM list;
human
can you show me a list of teacchers first name?
assistant
SELECT FirstName FROM teachers;
human
can you show me a list of teachers first name that starting with 'M'?
assistant
SELECT FirstName FROM teachers WHERE FirstName LIKE 'M%';
human
find all first-grade students who are not taught by otha moyer. | Do you mean First or Last names? | first
assistant
SELECT DISTINCT T1.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER" ;