CREATE TABLE "rankings" (
  "name" text,
  "rank" real,
  "out_of" real,
  "source" text,
  "notes" text,
  "year" real
);

Question: What is the highest rank that has fao as a source and an out greater than 50, with dietary calorie intake as the name?
SQL: SELECT MAX("rank") FROM "rankings" WHERE "source"='fao' AND "out_of">50 AND "name"='dietary calorie intake';

Question: What is the average rank that has cia world factbook as the source and a year prior to 2005?
SQL: SELECT AVG("rank") FROM "rankings" WHERE "source"='cia world factbook' AND "year"<2005;