-- Product scenario
SELECT user_id, city
FROM mock_users
WHERE city IN ('Beijing', 'Shanghai')
AND phone IS NOT NULL;
-- Learn by doing
SELECT user_id, city
FROM mock_users
WHERE city IN ('Beijing', 'Shanghai')
AND phone IS NOT NULL;
-- Learn by doing
Aju, AI Tutor
You have tried this filter twice. Before I show the answer, check whether multiple values should use IN (...).
LIVE
SQL PM Tutor
Learn SQL through real product scenarios, rather than syntax in isolation. Product managers can execute SQL, receive guided feedback from Aju, build a learning record, and practice data-analysis decisions.
Try SQL PM Tutor ↗