CREATE TABLE table_203_332 (id DECIMAL, "number" TEXT, "year built" DECIMAL, "builder" TEXT, "status" TEXT, "notes" TEXT)

how many of the locomotives were built before 1940 ?
SELECT COUNT(*) FROM table_203_332 WHERE "year built" < 1940
SELECT COUNT(*) FROM "table_203_332" WHERE "year built" < 1940