I am failing to understand why the following won't work
SELECT m.index, SUM(d1.amt), SUM(d2.amt)
FROM master m,
WHERE m.index = d1.index
AND m.index = d2.index
AND d2.qalif = 1
GROUP BY m.index
I wrote another sql that does work, I just don't understand why I get higher values on SUM(d2.amt) than I am expecting.