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;

Последнее изменение: воскресенье, 20 июня 2021, 06:37