On Fri, Jul 08, 2005 at 01:37:54PM +1000, Paul McGarry wrote:
>
> Thank you Michael, your suggestion works a charm (though I didn't
> bother coalescing the two grp because I think the USING takes care of
> that anyway.
Oops, yeah -- I had started with "ON b.grp = g.grp" but changed it
to "USING (g
Thank you Michael, your suggestion works a charm (though I didn't
bother coalescing the two grp because I think the USING takes care of
that anyway.
Paul
On 7/8/05, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> SELECT coalesce(g.grp, b.grp) AS grp,
>coalesce(g.count, 0) AS countgood,
>
On Fri, Jul 08, 2005 at 11:45:59AM +1000, Paul McGarry wrote:
> I basically want a query which will give me:
> ==
> grp | count(good) | sum(good) | count(bad) | sum(bad)
> -+-+-++--
>3 | 0 | | 1 | -5.00
>
Hi there everyone,
I'm having trouble getting the data I want from my tables.
Here is a simplified version of my tables:
==
create table lefty (
day date,
good numeric(10,2),
grp integer
);
insert into lefty values ('2005-06-01',5.00,1);
insert into lefty values ('2005-06-02',10.00,1);
in