CREATE TABLE "grading_and_available_subjects" (
  "percentage_range" text,
  "grade" text,
  "points_for_higher" real,
  "points_for_ordinary" real,
  "points_for_foundation" real
);

Question: What average points for highers has 0 has points for ordinary, and Ng as the grade, and less than 0 as points for foundation?
SQL: SELECT AVG("points_for_higher") FROM "grading_and_available_subjects" WHERE "points_for_ordinary"=0 AND "grade"='ng' AND "points_for_foundation"<0;

Question: What is the maximum points for higher when the points for foundation is less than 0?
SQL: SELECT MAX("points_for_higher") FROM "grading_and_available_subjects" WHERE "points_for_foundation"<0;

Question: With 10 as the points for foundation, what is the maximum points for ordinary?
SQL: SELECT MAX("points_for_ordinary") FROM "grading_and_available_subjects" WHERE "points_for_foundation"=10;