Division - Mailing list pgsql-sql

From Bernie Huang
Subject Division
Date
Msg-id 39C69B97.58B353A9@ec.gc.ca
Whole thread Raw
Responses ERROR: replace_vars_with_subplan_refs (!?)  (Louis-David Mitterrand <cunctator@apartia.ch>)
List pgsql-sql
Hi,

I tried the write up the following SQL statement:

result1 from sql1 = (1,2,3,4,5)
result2 from sql2 = (4,5)
result3 = result1/result2 (or is it result2/result1) = (1,2,3)

What do I have to do to get the (1,2,3) result?  I tried "query EXCEPT
query", but it seems like EXCEPT needs both tables in queries to be of
the same number of columns and column types.  And (any, all, exist)
doesn't seem to be a right solution.

Thanks for help.


- Bernie

Attachment

pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: info about tables
Next
From: Jie Liang
Date:
Subject: Re: Division