Получение уникальных значений. Distinct (16 мин.)
Требуемые условия завершения
select distinct
rental_rate
from
film;
select distinct
last_name,
first_name
from
actor;
select distinct
substring(last_name, 1, 3)
from
actor;
select distinct on (rental_rate)
rental_rate,
title
from
film;
select distinct on (inventory_id)
rental_id,
rental_date,
inventory_id,
customer_id,
return_date,
staff_id,
last_update
from
rental
order by
inventory_id,
rental_date desc;
select
rental_id,
rental_date,
inventory_id,
customer_id,
return_date,
staff_id,
last_update
from
rental
where
inventory_id = 1;
select distinct on (staff_id)
staff_id,
amount
from
payment
order by
staff_id,
amount desc;
Последнее изменение: пятница, 28 марта 2025, 13:21