Problem with Distinct Sum
646144Jun 19 2008 — edited Jun 20 2008Hi all,
I suddently found out a problem.
Firstly, I used SELECT DISTINCT to query my db, which filtered out most of the dupelicated data. Then I will to sum up a column, which only shows the distincted data rows. However, when I use SUM( l.db_waf_qty), it will add up the qty which has been filtered out by distinct, which leads to an incorrect result.
Please kindly help Thanks..
Jon