| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Bug in queries ?? |
| Date: | 2004-11-23 12:07:15 |
| Message-ID: | 41A327F3.2030400@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Joost Kraaijeveld wrote:
>
> If I run the following query:
>
> select cast(min(that_time) as abstime), cast(max(that_time) as abstime), (sum(bytes)/(1024*1024)) as "Totaal in Megabytes" from logs
> where
> that_time between cast( abstime('2004-10-1 00:00') as int4) and cast( abstime('2004-11-1 00:00') as int4)
> and
> rule_name = 'Incoming 83 50 in' or
> rule_name = 'Outgoing 83 50 out'
Do brackets solve your problem?
WHERE that_time betweeen ...
AND (
rule_name = ...
OR rule_name = ...
)
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Seymour | 2004-11-23 12:25:18 | Re: Bug in queries ?? |
| Previous Message | Woodchuck Bill | 2004-11-23 11:50:42 | Re: RFD: comp.databases.postgresql.* |