CREATE TABLE "ruapehu_district" (
  "name" text,
  "years" text,
  "area" text,
  "authority" text,
  "decile" real,
  "roll" real
);

Question: What years does Kakahi school, with a decile of 3, have?
SQL: SELECT "years" FROM "ruapehu_district" WHERE "decile"=3 AND "name"='kakahi school';

Question: What is the average decile of Ruapehu college, which has a state authority?
SQL: SELECT AVG("decile") FROM "ruapehu_district" WHERE "authority"='state' AND "name"='ruapehu college';

Question: What is the roll number of Orautoha school in Raetihi, which has a decile smaller than 8?
SQL: SELECT SUM("roll") FROM "ruapehu_district" WHERE "area"='raetihi' AND "name"='orautoha school' AND "decile"<8;