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.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!