Re: SQL problem (forgot to change header with earlier post!).

From: Paul Linehan <linehanp(at)tcd(dot)ie>
To: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SQL problem (forgot to change header with earlier post!).
Date: 2018-05-29 11:57:02
Message-ID: CAF4RT5QgydDifSN1zcPnEM9HVcmF4doCubf06MhLF-cOAG7W9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Linehan 2018-05-29 12:05:21 Re: SQL problem (forgot to change header with earlier post!).
Previous Message Paul Linehan 2018-05-29 11:51:45 Re: SQL problem (forgot to change header with earlier post!).