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

Question: What is the largest roll with Years 1–8, a Name of dorie school, and a Decile larger than 9?
SQL: SELECT MAX("roll") FROM "ashburton_district" WHERE "years"='1–8' AND "name"='dorie school' AND "decile">9;

Question: How many deciles have Years of 1–8, and a Roll of 49?
SQL: SELECT COUNT("decile") FROM "ashburton_district" WHERE "years"='1–8' AND "roll"=49;

Question: Which name has Years of 1–8, a Decile of 9, and a Roll smaller than 141?
SQL: SELECT "name" FROM "ashburton_district" WHERE "years"='1–8' AND "decile"=9 AND "roll"<141;

Question: What is the largest Decile with Years of 1–8, anAuthority of state, and a Roll of 141?
SQL: SELECT MAX("decile") FROM "ashburton_district" WHERE "years"='1–8' AND "authority"='state' AND "roll"=141;

Question: How many deciles have an Authority of state and a Name of chertsey school?
SQL: SELECT COUNT("decile") FROM "ashburton_district" WHERE "authority"='state' AND "name"='chertsey school';