CREATE TABLE `Classes` (
`class` VARCHAR(255) PRIMARY KEY,
`type` VARCHAR(2),
`country` VARCHAR(255),
`numGuns` INT,
`bore` INT,
`displacement` INT
);
CREATE TABLE `Ships` (
`name` VARCHAR(255) PRIMARY KEY,
`class` VARCHAR(255),
`launched`, INT
);
CREATE TABLE `Battles` (
`name` VARCHAR(255) PRIMARY KEY,
`date` DATE
);
CREATE TABLE `Outcomes` (
`ship` VARCHAR(255),
`battle` VARCHAR(255),
`result` VARCHAR(7)
);
ALTER TABLE `Classes` DROP COLUMN `bore`;
ALTER TABLE `Ships` ADD `yard` VARCHAR(255);
SELECT `class`, `country` FROM `Classes` WHERE `bore` >= 16;
SELECT `name` FROM `Ships` WHERE `launched` < 1921;
SELECT `ship` FROM `Outcomes` WHERE `battle` = 'Denmark Strait' AND `result` = 'sunk';
SELECT Ships.name FROM `Ships` JOIN `Classes` ON Ships.class = Classes.class WHERE Ships.launched > 1921 AND Classes.displacement > 35000;