Re: Math Query Help - Mailing list pgsql-novice

From George Weaver
Subject Re: Math Query Help
Date
Msg-id 002101c673ae$d7737690$6400a8c0@Dell4500
Whole thread Raw
In response to Math Query Help  (<operationsengineer1@yahoo.com>)
Responses Re: Math Query Help
List pgsql-novice
----- Original Message -----
From: <operationsengineer1@yahoo.com>
To: <pgsql-novice@postgresql.org>
Sent: Tuesday, May 09, 2006 3:59 PM
Subject: [NOVICE] Math Query Help


> (select count(inspect_pass) from t_inspect where
> inspect_pass = true)/(select count(inspect_pass) from
> t_inspect)
>
> i get the following error:
>
> ERROR:  syntax error at or near "/" at character 70
>
> how can i fix this?

This should work:

SELECT((select count(inspect_pass) from t_inspect where
inspect_pass = true)/(select count(inspect_pass) from
 t_inspect))

Regards,
George



pgsql-novice by date:

Previous
From:
Date:
Subject: Math Query Help
Next
From: Sean Davis
Date:
Subject: Re: Math Operations - DB or App?