Please list the IDs of all the trains that run in the east direction and have less than 4 cars.
less than 4 cars refers to carsNum < 4
SELECT T1.id FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS carsNum FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T1.direction = 'east' AND T2.carsNum < 4