SELECT * FROM employees WHERE dept='sales' OR salary>=25000;
/* AND is a operator that allows you to combine two conditions
Both conditions must be true for the row to b e included in the result set */
SELECT column_name(s)
FROM table_name
WHERE column_1 = value_1
AND column_2 = value_2;
Used alongside WHERE to include data when either condition is true.
Example: Returns users that live in either Sheffield or Manchester.
SELECT * FROM users
WHERE city = 'Sheffield' OR 'Manchester';
SELECT first_name, last_name
FROM Customers
WHERE country = 'USA' AND last_name = 'Doe';
Used to join separate conditions within a WHERE clause.
Example: Returns events located in London, United Kingdom
SELECT * FROM events
WHERE host_country='United Kingdom' AND host_
city='London';
AND (
f.termination_date IS NULL
OR
f.termination_date > CURRENT_DATE
)
SELECT first_name, last_name
FROM Customers
WHERE country = 'USA' OR last_name = 'Doe';