Re: Math Query Help

From: George Weaver <gweaver(at)shaw(dot)ca>
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: Math Query Help
Date: 2006-05-09 21:23:38
Message-ID: 002101c673ae$d7737690$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


----- Original Message -----
From: <operationsengineer1(at)yahoo(dot)com>
To: <pgsql-novice(at)postgresql(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2006-05-09 21:32:46 Re: Math Operations - DB or App?
Previous Message operationsengineer1 2006-05-09 20:59:36 Math Query Help