How many rows does an INNER JOIN return when the join keys contain duplicates and NULL?
Tables iv_t1 and iv_t2 each have a single column, x. Both tables contain duplicate values and NULL. How many rows will the join return?
Predict the resultJOIN and row countsJuniorAnalystData EngineerBackendQA
Input data · iv_t1
| x |
|---|
| 1 |
| 1 |
| 2 |
| NULL |
Input data · iv_t2
| x |
|---|
| 1 |
| 2 |
| 2 |
| 3 |
| NULL |
Query
SELECT a.x AS a_x, b.x AS b_x
FROM iv_t1 a
JOIN iv_t2 b ON a.x = b.x
ORDER BY a.x, b.x