Table: locomotive_data
Columns: number
builder
type
date
works_number

Question: Which Works number has a Number larger than 807, and a Type of 0-6-0, and a Date of 1920?
SQL: SELECT AVG("works_number") FROM locomotive_data WHERE "number" > 807 AND "type" = '0-6-0' AND "date" = 1920

Question: Which Type has a Date smaller than 1943, and a Builder of alco schenectady, and a Number larger than 822, and Works number of 59867?
SQL: SELECT "type" FROM locomotive_data WHERE "date" < 1943 AND "builder" = 'alco schenectady' AND "number" > 822 AND "works_number" = 59867

Question: Which Date has a Builder of alco schenectady, and a Number larger than 835, and Works number of 56566?
SQL: SELECT AVG("date") FROM locomotive_data WHERE "builder" = 'alco schenectady' AND "number" > 835 AND "works_number" = 56566