CREATE TABLE "tonnage_for_port_of_anchorage" (
  "year" real,
  "u_s_rank" real,
  "total_s_ton" real,
  "domestic_s_ton" real,
  "foreign_total_s_ton" real,
  "foreign_imports_s_ton" real,
  "foreign_exports_s_ton" real
);

Question: how many times is the total s ton less than 2,983,137 and the u.s. rank less than 102?
SQL: SELECT COUNT("year") FROM "tonnage_for_port_of_anchorage" WHERE "total_s_ton"<'2,983,137' AND "u_s_rank"<102;

Question: what is the average domestic s tone when the foreign imports s tone is less than 225,281 and the year is later than 2003?
SQL: SELECT AVG("domestic_s_ton") FROM "tonnage_for_port_of_anchorage" WHERE "foreign_imports_s_ton"<'225,281' AND "year">2003;

Question: what is the average domestic s tone when the total s tone is 2,926,536 and the foreign imports s tone is less than 464,774?
SQL: SELECT AVG("domestic_s_ton") FROM "tonnage_for_port_of_anchorage" WHERE "total_s_ton"='2,926,536' AND "foreign_imports_s_ton"<'464,774';

Question: what is the average foreign imports s tone when the total s tone is 3,157,247 and the foreign exports s ton is less than 358,493?
SQL: SELECT AVG("foreign_imports_s_ton") FROM "tonnage_for_port_of_anchorage" WHERE "total_s_ton"='3,157,247' AND "foreign_exports_s_ton"<'358,493';

Question: how many times is the U.S. Rank 102, the year earlier than 2006 and the total s ton less than 2,983,137?
SQL: SELECT COUNT("foreign_total_s_ton") FROM "tonnage_for_port_of_anchorage" WHERE "u_s_rank"=102 AND "year"<2006 AND "total_s_ton"<'2,983,137';

Question: what is the highest u.s. rank when the foreign total s ton is more than 703,638, the year is earlier than 2005, the foreign imports s ton is 284,347 and the foreign exports s ton is smaller than 478,317?
SQL: SELECT MAX("u_s_rank") FROM "tonnage_for_port_of_anchorage" WHERE "foreign_total_s_ton">'703,638' AND "year"<2005 AND "foreign_imports_s_ton"='284,347' AND "foreign_exports_s_ton"<'478,317';