CREATE TABLE "goals" (
  "rank" real,
  "name" text,
  "years" text,
  "league" real,
  "total" real
);

Question: What is average for Benito Lorenzi league when total is smaller than 143?
SQL: SELECT AVG("league") FROM "goals" WHERE "name"='benito lorenzi' AND "total"<143;

Question: Which league has total smaller than 284, with Sandro Mazzola league?
SQL: SELECT MIN("league") FROM "goals" WHERE "total"<284 AND "name"='sandro mazzola';