Subject | Re: AW: [firebird-support] Problem Select sum .. in select |
---|---|
Author | Doug Chamberlin |
Post date | 2010-01-29T16:22:48Z |
On 1/29/2010 11:17 AM, Olaf Kluge wrote:
From your example it is not clear why TableB is included at all. You
are summing value (which is in TableA) and filtering on "group" (which
is in TableA).
Can you fix and clarify?
--
Doug C.
-----
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
> select sum(value) from tableA where person-id in ( FOR select id fromThat's because "group" does not exist in TableB. It is in TableA.
> tableB where group = 1) - the "for" doesn't work
From your example it is not clear why TableB is included at all. You
are summing value (which is in TableA) and filtering on "group" (which
is in TableA).
Can you fix and clarify?
--
Doug C.
-----
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?