human
Schema:
list (LastName, FirstName, Grade, Classroom)
teachers (LastName, FirstName, Classroom)
Please answer with SQL.
assistant
Sure, I understand.
human
How many students does KAWA GORDON teaches?
assistant
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'
human
How many teachers does the student named MADLOCK RAY have?
assistant
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'
human
How many teachers does the student named CHRISSY NABOZNY have?
assistant
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'
human
Which classroom has the most students?
assistant
SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1
human
How many students does LORIA ONDERSMA teaches?
assistant
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'
human
How many students are taught by teacher TARRING LEIA?
assistant
SELECT COUNT( * ) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA" ;