Database schema:

CREATE TABLE country (
	origin INTEGER -- example: ['2', '1'],
	country TEXT -- example: ['Europe', 'USA'],
	PRIMARY KEY (origin)
)


CREATE TABLE data (
	"ID" INTEGER -- example: ['2', '1'],
	mpg REAL -- example: ['15.0', '18.0'],
	cylinders INTEGER -- example: ['8', '4'],
	displacement REAL -- example: ['350.0', '307.0'],
	horsepower INTEGER -- example: ['130', '165'],
	weight INTEGER -- example: ['3693', '3504'],
	acceleration REAL -- example: ['11.5', '12.0'],
	model INTEGER -- example: ['71', '70'],
	car_name TEXT -- example: ['chevrolet chevelle malibu', 'buick skylark 320'],
	PRIMARY KEY ("ID"), 
	CONSTRAINT fk_data_price FOREIGN KEY("ID") REFERENCES price ("ID")
)


CREATE TABLE price (
	"ID" INTEGER -- example: ['2', '1'],
	price REAL -- example: ['24221.42273', '25561.59078'],
	PRIMARY KEY ("ID")
)


CREATE TABLE production (
	"ID" INTEGER -- example: ['2', '1'],
	model_year INTEGER -- example: ['1971', '1970'],
	country INTEGER -- example: ['1', '3'],
	PRIMARY KEY ("ID", model_year), 
	CONSTRAINT fk_production_country FOREIGN KEY(country) REFERENCES country (origin),
	CONSTRAINT fk_production_data FOREIGN KEY("ID") REFERENCES data ("ID"),
	CONSTRAINT fk_production_price FOREIGN KEY("ID") REFERENCES price ("ID")
)

Question: Calculate the percentage of American cars among all cars.
Evidence: American car refers to country = 'USA'; percentage = divide(count(ID where country = 'USA'), count(ID)) * 100%

SQL:
SELECT CAST(SUM(CASE WHEN T3.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country