CREATE TABLE "locomotives_and_wagons" (
  "class" text,
  "quantity" real,
  "type" text,
  "delivered" text,
  "k_b_sts_b_class" text,
  "retired" text
);

Question: What is the type of the locomotive which was delivered in 1857-59?
SQL: SELECT "type" FROM "locomotives_and_wagons" WHERE "delivered"='1857-59';

Question: What is the highest quantity of the b ix k.b.sts.b.?
SQL: SELECT MAX("quantity") FROM "locomotives_and_wagons" WHERE "k_b_sts_b_class"='b ix';

Question: What is the lowest quantity of the 1b n2 type, which was retired in 1907-12?
SQL: SELECT MIN("quantity") FROM "locomotives_and_wagons" WHERE "type"='1b n2' AND "retired"='1907-12';