Skip to content
Advertisement

How to compare column combinations from two tables?

I have two tables from different years, 2015 and 2016. Both tables have three columns as exampled below in table_2015:

I want to see how many people had the same plan type between the years and how many people switched plan types. How do I go about doing this?

Advertisement

Answer

If customers are in each table only once and you only care about the overlaps, then:

If you actually want to compare the plan types, then use aggregation:

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