This query gives me 2 rows but the result is presented a just 1 row. I dont understand why. I want the result as 2 rows.
SELECT *
FROM table AS S1
INNER JOIN table AS S2
ON S1.code = S2.code
WHERE S1.column1 IS NULL
AND S2.column1 IS NOT NULL
Here is the ouptput that i am expecting:
EXPECTED OUTPUT:
ID login email code column1
--------------------------------------------
96 testid1 test-Email1 XPQR NULL
97 testid1 test-Email1 XPQR P
Just a wild guess: