[SQL] Using chkpass() in a query

2003-12-11 Thread Michael A Nachbaur
I'm trying to perform an SQL statement to extract usernames and crypt'd passwords from a database table, and am running into difficulties with chkpass. I can run it just fine in a straight query, but when I try to use it on a column from an SQL statement I get an error. scamp=# SELECT CHKPASS(

[SQL] simple LEFT JOIN giving wrong results ...

2003-12-11 Thread Marc G. Fournier
I've got to be missing something obvious here ... I have two tables, on containing traffic stats, the other disk usage ... I want to do a JOIN in one query to give me the sum of traffic and average of storage ... seperately, the results are right .. put together, traffic values are way off, while

Re: [SQL] simple LEFT JOIN giving wrong results ...

2003-12-11 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > So, I'm doing my LEFT JOIN wrong *somehow*, but its eluding me as to > what/how .. :( > ams=# select ct.ip_id, sum(ct.bytes) as traffic, > avg(cs.bytes)::bigint as storage > from company_00186.traffic ct >left join company_0

Re: [SQL] simple LEFT JOIN giving wrong results ...

2003-12-11 Thread Marc G. Fournier
On Thu, 11 Dec 2003, Tom Lane wrote: > "Marc G. Fournier" <[EMAIL PROTECTED]> writes: > > So, I'm doing my LEFT JOIN wrong *somehow*, but its eluding me as to > > what/how .. :( > > > ams=# select ct.ip_id, sum(ct.bytes) as traffic, > > avg(cs.bytes)::bigint as storage > > fro

Re: [SQL] simple LEFT JOIN giving wrong results ...

2003-12-11 Thread Stephan Szabo
On Thu, 11 Dec 2003, Marc G. Fournier wrote: > > I've got to be missing something obvious here ... I have two tables, on > containing traffic stats, the other disk usage ... I want to do a JOIN in > one query to give me the sum of traffic and average of storage ... > seperately, the results are ri