-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02_04.sql
54 lines (44 loc) · 1.16 KB
/
02_04.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
select
srvc_name,
min_participants,
per_person_price
from dbo.additional_service
-- find the rows for services that require no more than 6 participants and costs no more than $25 per person
select
srvc_name,
min_participants,
per_person_price
from dbo.additional_service
where min_participants <= 6
and per_person_price <= 25
-- filter again to just show the catering services that meet the last criteria
select
srvc_name,
min_participants,
per_person_price
from dbo.additional_service
where min_participants <= 6
and per_person_price <= 25
and srvc_name like 'catering%'
-- find the rows for either catering services, gift baskets, or the Two Trees Tasting Party
select
srvc_name,
min_participants,
per_person_price
from dbo.additional_service
where srvc_name like 'catering%'
or srvc_name like 'gift%'
or srvc_name = 'two Trees Tasting Party'
-- find the rows for services that cost less than $30 that are either catering or gift baskets
select
srvc_name,
min_participants,
per_person_price
from dbo.additional_service
where per_person_price < 30
and
(
srvc_name like 'catering%'
or
srvc_name like 'gift%'
)