CREATE TABLE "ntua_academic_staff_per_school" (
  "lecturers" real,
  "associate_professors" real,
  "assistant_professors" real,
  "professors" real,
  "total" real
);

Question: What is the total in the case where theere are 6 lecturers and fewer than 48 professors?
SQL: SELECT AVG("total") FROM "ntua_academic_staff_per_school" WHERE "lecturers"=6 AND "professors"<48;

Question: What is the total in the case when there are more than 4 associate professors, 5 lecturers and fewer professors than 40?
SQL: SELECT COUNT("total") FROM "ntua_academic_staff_per_school" WHERE "associate_professors">4 AND "lecturers"=5 AND "professors"<40;

Question: How may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors, more than 14 professors and total of more than 81?
SQL: SELECT COUNT("lecturers") FROM "ntua_academic_staff_per_school" WHERE "assistant_professors">8 AND "professors">14 AND "associate_professors"<35 AND "total">81;

Question: What is the maximum number of associate professors when there are more than 5 assistant professors and fewer than 14 professors?
SQL: SELECT MAX("associate_professors") FROM "ntua_academic_staff_per_school" WHERE "assistant_professors">5 AND "professors"<14;