IN
IN
The IN operator is useful for working with both numeric and text columns. This operator allows you to use an
=
, but for more than one item of that particular column. We can check one, two or many column values for which we want to pull data, but all within the same query.Questions using IN operator
Use the accounts table to find the account
name
,primary_poc
, andsales_rep_id
for Walmart, Target, and Norstrom.
SELECT name, primary_poc, sales_rep_id FROM accounts WHERE name IN ('Walmart', 'Target', 'Nordstrom');
2. Use the web_events table to find all information regarding individuals who were contacted via the channel of
organic
or adwords
.SELECT * FROM web_events WHERE channel IN ('organic', 'adwords');
Comments
Post a Comment