Hi there, on exercise https://www.codecademy.com/paths/data-science/tracks/sql-intermediate/modules/dspath-sql-multiple-tables/projects/querying-tables
bonus question 8,
"REBU is looking to do an email campaign for all the irregular users.
Find all the riders who have used REBU less than 500 times!"
are the instructions.
I coded:
WHERE total_riders AS(
SELECT * FROM riders
UNION
SELECT * FROM riders2
)
SELECT first, last, username
FROM total_riders
WHERE total_trips < 500;
my thought process being that there are two tables of riders: riders, and riders2. So I used union to create a new dataset, and then I wanted to query that combined dataset for all riders that have taken less than 500 rides. When I hit save, nothing appears. No error message, just nothing. I looked at the intended solution, which is simply to do a union query of all rows from both tables, but what I really want to know is why my query didn’t work, and how to actually accomplish what I was trying to do.