Database: battle_death
# battle ( id , name , date , bulgarian_commander , latin_commander , result )
# ship ( lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship )
# death ( caused_by_ship_id , id , note , killed , injured )
# ship.lost_in_battle = battle.id
# death.caused_by_ship_id = ship.id

Question: How many ships ended up being 'Captured'?
SQL: select count ( * ) from ship where disposition_of_ship = 'Captured'

Question: List the name and tonnage ordered by in descending alphaetical order for the names.
SQL: select name , tonnage from ship order by name desc

Question: List the name, date and result of each battle.
SQL: select name , date from battle

Question: What is maximum and minimum death toll caused each time?
SQL: select max ( killed ) , min ( killed ) from death

Question: What is the average number of injuries caused each time?
SQL: select avg ( injured ) from death

Question: What are the death and injury situations caused by the ship with tonnage 't'?
SQL: select death.killed , death.injured from death join ship on death.caused_by_ship_id = ship.id where ship.tonnage = 't'

Question: What are the name and results of the battles when the bulgarian commander is not 'Boril'
SQL: select name , result from battle where bulgarian_commander != 'Boril'

Question: What are the different ids and names of the battles that lost any 'Brig' type shipes?
SQL: select distinct battle.id , battle.name from battle join ship on battle.id = ship.lost_in_battle where ship.ship_type = 'Brig'

Question: What are the ids and names of the battles that led to more than 10 people killed in total.
SQL: select battle.id , battle.name from battle join ship on battle.id = ship.lost_in_battle join death on ship.id = death.caused_by_ship_id group by battle.id having sum ( death.killed ) > 10

Question: What is the ship id and name that caused most total injuries?
SQL: select ship.id , ship.name from death join ship on death.caused_by_ship_id = ship.id group by ship.id order by count ( * ) desc limit 1

Question: What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
SQL: select name from battle where bulgarian_commander = 'Kaloyan' and latin_commander = 'Baldwin I'

Question: How many different results are there for the battles?
SQL: select count ( distinct result ) from battle

Question: How many battles did not lose any ship with tonnage '225'?
SQL: select count ( * ) from battle where id not in ( select lost_in_battle from ship where tonnage = '225' )

Question: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
SQL: select battle.name , battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' intersect select battle.name , battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'HMS Atalanta'

Question: Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
SQL: select name , result , bulgarian_commander from battle except select battle.name , battle.result , battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.location = 'English Channel'

Question: What are the notes of the death events which has substring 'East'?
SQL: select note from death where note like '%East%'