Files
sql_advanced/lab2-8-test/task7.sql
T
Vitalii Litvinchuk 6deed0469a first commit
2026-05-04 23:15:09 +03:00

20 lines
862 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#################################################
################ Завдання 7 ###################
--------------------------------------------------
1. Створіть представлення з іменем "BookingsView" для відображення ідентифікаторів,
дат бронювання та кількості гостей для замовлень, зроблених до 2021-11-13,
якщо кількість готей більша ніж 3.
--------------------------------------------------
2. Здійсніть вивід усіх даних з новоствореної віртуальної таблиці.
create view BookingsView as
select
CustomerID,
BookingDate,
NumberOfGuests
from Bookings
where
BookingDate < '2021-11-13'
and NumberOfGuests > 3;
select * from BookingsView;