Books and articles about SQL Сменить язык на: Русский 18 November 2017 07:18:48

# Typical errors at solution of exercises (database "Ships")

AuthorS. Moiseenko

## Exercise 35

Point out the names, displacements and number of guns of ships participating in the battle at Guadalcanal.

AuthorS. Moiseenko

## Exercise 37

Find the classes including only one ship in the database ( taking into account Outcomes table ).

AuthorS. Moiseenko

## Exercise 38

Find the countries having classes of both ordinary ships and cruisers.

AuthorS. Moiseenko

## Exercise 39

Define the ships that "survived for future battles"; being damaged in one battle, they took part in another.

AuthorS. Moiseenko

## Exercise 41

Define the names of all ships in the database launched before 1941.

AuthorS. Moiseenko

## Exercise 42

For each battle find out the first and the last day of the month when the battle took place. Result set: tne battle name, the first day of month, the last day of month.

AuthorS. Moiseenko

## Exercise 43

For each country, find the year, in which the maximal number of ships had been launched.
In the case of more than one year in question, take a minimal year. Result set : country , number of ships , year.

AuthorS. Moiseenko

## Exercise 46

Point out the battles in which at least three ships of the same country took part.

AuthorS. Moiseenko

## Exercise 50

The weight of a shell fired by the gun, in pounds, is nearly equal to half the cube of its caliber. Define the average weight of shells for ships of each country. Take into account the ships from the Outcomes table, too.

AuthorS. Moiseenko

## Exercise 51

Find the names of the ships having the largest amount of guns among all the ships with the same displacement (taking into account Outcomes table).

AuthorS. Moiseenko

## Exercise 53

To within two decimal digits, define the average amount of guns for the battleship classes.

AuthorS. Moiseenko

## Exercise 54

To within two decimal digits, define the average amount of guns for all the battleships (taking into account Outcomes table).

AuthorS. Moiseenko

## Exercise 55

For each class, define the year in which the first ship of this class was launched.
Result set : class , year.

AuthorS. Moiseenko

## Exercise 56

For each class, define the number of ships of this class that were sunked in a battles. Result set: class, number of sunked ships.

AuthorS. Moiseenko

## Exercise 57

For every class that has not less than 3 ships in the database determine the number of ships of this class sunk in the battles, if any. Output: class and the number of the sunken ships.


 Usage of any materials of this site is possibleonly under condition of mandatory allocation of the direct link to a sitehttp://www.sqlbooks.ruon each page where used materials are placed. Main Articles Books