Skip to content
Advertisement

MySQL Query to combine two tables

I’m trying to get a MySQL query to combine two tables. Both tables have a user_id and date column and the other columns are unique to each table. What I’m looking to accomplish is best explained with an image (imgur). I’ve tried various joins and unions and can’t get the right combination. I’ve also tried searching stackoverflow but I’m likely not using the right terminology for what I’m looking to do.

The description of the tables in TEXT:

Advertisement

Answer

With UNION ALL you can achieve that

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement