Сделай вложенный подзапрос для корабликов в справочнике Ships и в списке Outcomes, свяжи со странами в Classes, посчитай отдельно количество корабликов по странам и затопленных корабликов на страну, сравни получившиеся суммы.
with a1 (country,ship) as
(
select country, class
from outcomes oc
join Classes cl on cl.class = oc.ship
union
select country, name
from Ships ss
join classes cl on cl.class = ss.class
)
select
t1.country from(
select
a1.country , count(a1.ship) all_ships, null sunk_ships
from a1
group by
a1.country union all
select
a1.country , null, count(oc.result)
from outcomes oc
join a1 on a1.ship = oc.ship
where oc.result = 'sunk'
group by
a1.country ) t1
group by
t1.country having sum(t1.all_ships) = sum(t1.sunk_ships)
* Неверное число записей (меньше на 1):
Схема БД прикреплена ниже.
SELECT country FROM Classes WHERE country IN (SELECT country FROM Classes LEFT JOIN Outcomes ON Classes.class=Outcomes.ship WHERE Result='sunk') GROUP BY country