select distinct WAR.Name as 'Ονομασία Πολέμου',
WAR.War_ID as 'Κωδικός Πολέμου',
count(*) as 'Αριθμός Πλοίων',
max(SHIP.ship_name)
from WAR,AT_WAR,SHIP
where SHIP.Ship_Name=AT_WAR.Ship_Name
and WAR.War_ID=AT_WAR.War_ID
group by SHIP.Ship_Name``
having count(SHIP.Ship_Name)