garry@xxxxxxxxxxxxxxxxxxxx wrote: > Quoting Richard Huxton <dev@xxxxxxxxxxxx>: >> But I'm guessing that's not what you mean. Can you show what output >> you'd like to have? > > effort sum > 1 245 > 2 463 > etc. > > Each value for effort has a different statistical meaning as in the case > statement. Sorry - still don't understand. The query you originally gave should have provided the sum for each case (which you seem to be calling "effort" here. I don't see where the problem is. -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general