How many trains running west have double sided cars in 3rd position?
west is a direction; double sided cars refers to sides = 'double'; 3rd position refers to position = 3
SELECT COUNT(T.train_id) FROM (SELECT T1.train_id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 3 AND T2.direction = 'west' AND T1.sides = 'double' GROUP BY T1.train_id)as T