I'm struggling to find the right approach to what I want to achieve. So here's what I have:
Query A gives me the following result:
| TrainingID | totalPass |
|---|---|
| 2 | 5 |
| 3 | 7 |
| 4 | 8 |
Query B gives me the following
| TrainingID | totalFail |
|---|---|
| 2 | 3 |
| 6 | 7 |
| 7 | 9 |
The result I'd like to have is the following:
| TrainingID | totalPass | totalFail |
|---|---|---|
| 2 | 5 | 3 |
| 3 | 7 | Null |
| 4 | 8 | Null |
| 6 | Null | 7 |
| 7 | Null | 9 |
I tried emulating an outer join in MySQL by combining left and right join with an union but the result is not quite what I want, but the closest I could get into. Perhaps my main issue is that I don't know a terminology to describe what is exactly this operation I'm trying to do so I don't know what to search for.