Re: [SQL] wrong answer

2007-08-21 Thread Richard Huxton
A. R. Van Hook wrote: I have a simple (and incorrect queuer) that gives the wrong answer. Can someone show me the correct syntax? t "select sum(s.ref), r.value, s.ref from registry as s ^^^ Simple typo - you've used sum() not count() qs "select count(*) from registry where ref =3

[SQL] wrong answer

2007-08-21 Thread A. R. Van Hook
I have a simple (and incorrect queuer) that gives the wrong answer. Can someone show me the correct syntax? t "select sum(s.ref), r.value, s.ref from registry as s left join referralkey as r on (s.ref = r.cd) group by s.ref, r.value order by r.value, s.ref" sum | value | ref --+