I have two tables (t1 and t2) that both includes 100 of columns with the exact same names like the following:
Table 1
| id | A | B |
|---|---|---|
| 123 | 1 | 0 |
| 234 | 0 | 1 |
| 345 | 1 | 1 |
Table 2
| id | A | B |
|---|---|---|
| 123 | 1 | 0 |
| 234 | 0 | 1 |
| 345 | 1 | 0 |
Both of them have an id column and the columns that only include 1 and 0 values. I need to see if these columns match each other. Is there any way to build a table like the following that shows what percentage of each column with the same name match:
| t1 | t2 | matched? |
|---|---|---|
| A | A | 100% |
| B | B | 66% |
Thanks in advance!
