What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?
CREATE TABLE "by_type" (
  "rocket" text,
  "country" text,
  "family" text,
  "launches" real,
  "successes" real,
  "failures" real,
  "partial_failures" real
);
SELECT AVG("launches") FROM "by_type" WHERE "failures"=0 AND "rocket"='soyuz' AND "successes"<12;