CREATE TABLE "locomotives" (
  "number" real,
  "name" text,
  "builder" text,
  "type" text,
  "works_number" real,
  "date" real
);

Question: What number has the builder ruston hornsby, the date 1961, and the name Topsy?
SQL: SELECT COUNT("number") FROM "locomotives" WHERE "builder"='ruston hornsby' AND "date"=1961 AND "name"='topsy';

Question: What is the number with the builder hunslet and a works number greater than 822?
SQL: SELECT COUNT("number") FROM "locomotives" WHERE "builder"='hunslet' AND "works_number">822;