On Sun, 25 Dec 2011 00:46:03 -0800 (PST), dvdavins (AT) pobox (DOT) com wrote:
Quote:
I thought I had it with an self join, distinct, group by... but my
numbers were twice what they should have been. When I took out the
SUM(), there were twice as many rows as there should have been, though
each stat was only matched with any xstat once--the rows were not
duplicates of each other. |
Have you read up on DISTINCT yet? And you're probably going to want to
do some tricks with subqueries to materialize you aggregate columns if
you get much more complicated, which the next paragraph made sound
likely.
--
Give a man a fish and you feed him for a day; give him a freshly-charged
Electric Eel and chances are he won't bother you for anything ever
again.
-- Tanuki