CREATE TABLE "numbers_and_names" (
  "hr_no" text,
  "hr_name" text,
  "cr_no" real,
  "lms_no" real,
  "built" text,
  "works" text,
  "withdrawn" text
);

Question: What's the HR number when the LMS number is 14758?
SQL: SELECT "hr_no" FROM "numbers_and_names" WHERE "lms_no"=14758;

Question: What's the CR number that has an LMS number less than 14761 and works of Hawthorn Leslie 3100?
SQL: SELECT AVG("cr_no") FROM "numbers_and_names" WHERE "works"='hawthorn leslie 3100' AND "lms_no"<14761;

Question: What's the HR Number when the LMS number is 14757 and has a built of 9/1915?
SQL: SELECT "hr_no" FROM "numbers_and_names" WHERE "built"='9/1915' AND "lms_no"=14757;

Question: What's the built date when the CR number is more than 940 and the LMS number is 14760?
SQL: SELECT "built" FROM "numbers_and_names" WHERE "cr_no">940 AND "lms_no"=14760;