Table: railway_locomotives_2
Columns: class
wheel_arrangement
railway
number_at_doncaster
number_at_lincoln

Question: Which Class has a Number at Lincoln smaller than 1 and a Wheel Arrangement of 0-6-0?
SQL: SELECT "class" FROM railway_locomotives_2 WHERE "number_at_lincoln" < 1 AND "wheel_arrangement" = '0-6-0'

Question: Which Class has a Number at Lincoln larger than 0 and a Number at Doncaster of 8?
SQL: SELECT "class" FROM railway_locomotives_2 WHERE "number_at_lincoln" > 0 AND "number_at_doncaster" = 8