### Database Schema:
CREATE TABLE trains (
	id	INTEGER	NOT NULL	PRIMARY KEY,
	direction	TEXT	NULL	DEFAULT NULL
);

CREATE TABLE cars (
	id	INTEGER	NOT NULL	PRIMARY KEY,
	train_id	INTEGER	NULL	DEFAULT NULL,
	position	INTEGER	NULL	DEFAULT NULL,
	shape	TEXT	NULL	DEFAULT NULL,
	len	TEXT	NULL	DEFAULT NULL,
	sides	TEXT	NULL	DEFAULT NULL,
	roof	TEXT	NULL	DEFAULT NULL,
	wheels	INTEGER	NULL	DEFAULT NULL,
	load_shape	TEXT	NULL	DEFAULT NULL,
	load_num	INTEGER	NULL	DEFAULT NULL,
	foreign key (train_id) references trains (id)
);

### User's Query:
Provide the directions for all the trains that have 2 or less cars.

### Extra Knowledge:
2 or less cars refers to trailPosi < = 2
SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T2.trailPosi <= 2