CREATE TABLE "results_by_year" (
  "year" real,
  "mens_open" text,
  "womens_open" text,
  "mixed_open" text,
  "mens_u20" text,
  "womens_u20" text,
  "senior_mixed" text,
  "mens_30" text,
  "womens_30" text,
  "mens_35" text,
  "womens_35" text,
  "mens_40" text,
  "womens_40" text,
  "mens_45" text,
  "mens_50" text
);

Question: How many times was the mens u20 recorded when the Womens 40 were Sydney Scorpions def North Queensland Cyclones?
SQL: SELECT COUNT("mens_u20") FROM "results_by_year" WHERE "womens_40"='Sydney Scorpions def North Queensland Cyclones';

Question: What were the results for mens 40 when the mens u20 was Southern Suns def Gold Coast Sharks?
SQL: SELECT "mens_40" FROM "results_by_year" WHERE "mens_u20"='Southern Suns def Gold Coast Sharks';

Question: What were the results of the mens open when the  womens 40 was Sydney Scorpions defeated Hunter Hornets?
SQL: SELECT "mens_open" FROM "results_by_year" WHERE "womens_40"='Sydney Scorpions defeated Hunter Hornets';

Question: What were the results of the womens u20 when the mens 45 was  Sunwest Razorbacks def Northern Eagles?
SQL: SELECT "womens_u20" FROM "results_by_year" WHERE "mens_45"='SunWest Razorbacks def Northern Eagles';

Question: What was the mens 45 when mens 40 was Sunwest Razorbacks def Sydney Mets?
SQL: SELECT "mens_45" FROM "results_by_year" WHERE "mens_40"='SunWest Razorbacks def Sydney Mets';

Question: What was the mens open when the mens u20 was  Qld Country Rustlers def Southern Suns?
SQL: SELECT "mens_open" FROM "results_by_year" WHERE "mens_u20"='Qld Country Rustlers def Southern Suns';