select
*
from
nyc_311
where
complaint_type IN ('Illegal Fireworks', 'Noise - Residential')
and descriptor IN ('Loud Music/Party', 'Banging/Pounding')
limit
25
select
*
from
nyc_311
where
complaint_type IN ('Illegal Fireworks', 'Noise - Residential')
and descriptor NOT IN ('Loud Music/Party', 'Banging/Pounding')
limit
25
-- All return true since it matches the exact word
select
'maple' like '%maple', --true
'maple' like 'maple%', --true
'maple' like '%maple%' --true
-- The first returns false since the phrase does not end in the word "maple"
select
'maple syrup' like '%maple', --false
'maple syrup' like 'maple%', --true
'maple syrup' like '%maple%' --true
-- The second returns false since the phrase does not begin with the word "maple"
select
'red maple' like '%maple', --true
'red maple' like 'maple%', --false
'red maple' like '%maple%' --true