Write SQL query to solve given problem: Trains that run in which direction have more rectangle-shaped cars in total?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS rectCarsNum FROM cars WHERE shape = 'rectangle' GROUP BY train_id ) AS T2 ON T1.id = T2.train_id ORDER BY T2.rectCarsNum DESC