Re: SQL problem (forgot to change header with earlier post!). - Mailing list pgsql-general

From Paul Linehan
Subject Re: SQL problem (forgot to change header with earlier post!).
Date
Msg-id CAF4RT5QgydDifSN1zcPnEM9HVcmF4doCubf06MhLF-cOAG7W9g@mail.gmail.com
Whole thread Raw
In response to Re: SQL problem (forgot to change header with earlier post!).  (Moreno Andreo <moreno.andreo@evolu-s.it>)
List pgsql-general
Hi and grazie for your reply!


> If it's not an excercise, I think you don't need them


Not an exercise - I have to use the VIEW though - this was only a
sample. In real life the VIEW is trickier!


> select (select count(*) from t1) / (select count(*) from t2)::float

Looks as if the CAST was part of it.

Check here: https://dbfiddle.uk/?rdbms=postgres_10&fiddle=9a15766de01946d7f57b4298d8fb1028

Thanks for your input!


Pól...


pgsql-general by date:

Previous
From: Paul Linehan
Date:
Subject: Re: SQL problem (forgot to change header with earlier post!).
Next
From: Paul Linehan
Date:
Subject: Re: SQL problem (forgot to change header with earlier post!).