### 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:
List all the load shapes of all head cars of each train and identify which load shape has the highest number. Calculate the percentage of the trains with the said head car that are running eas

### Extra Knowledge:
which load shape has the highest number refers to MAX(load_shape); head car refers to position = 1; east is a direction; calculation = MULTIPLY(DIVIDE(count(direction = 'east' where MAX(load_shape) where position = 1 then id), count(id)), 100)
SELECT DISTINCT T3.load_shape FROM ( SELECT load_shape, train_id FROM cars WHERE position = 1 ORDER BY train_id DESC ) AS T3 UNION ALL SELECT T4.load_shape FROM ( SELECT load_shape, train_id FROM cars WHERE position = 1 ORDER BY train_id DESC LIMIT 1 ) AS T4 UNION ALL SELECT (CAST(COUNT(DISTINCT CASE WHEN T2.direction = 'east' THEN T2.id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.id)) FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 1 AND T1.load_shape = ( SELECT T4.load_shape FROM ( SELECT load_shape, train_id FROM cars AS T WHERE position = 1 ORDER BY train_id DESC LIMIT 1 ) AS T4 )