pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yasir Malik <ymalik@heineken.cs.stevens-tech.edu>
To: ronald@my.msuiit.edu.ph
Cc: pgsql-sql@postgresql.org
Subject: Re: help me...
Date: Sun, 9 Nov 2003 15:53:35 -0500 (EST)
Message-ID: <Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu> (raw)
In-Reply-To: <20031108060215.7557.qmail@web14605.mail.yahoo.com>
References: <20031108060215.7557.qmail@web14605.mail.yahoo.com>

Hi,
I'm usually wrong, but you can create a view for Query1 and Query2.  That
is do
create view Query1 [your query for query1];
create view Query2 [your query for query2];

Then what you are doing should work.
Regards,
Yasir

On Sat, 8 Nov 2003, [iso-8859-1] ron_tabada wrote:

> Date: Sat, 8 Nov 2003 06:02:15 +0000 (GMT)
> From: "[iso-8859-1] ron_tabada" <ron_tabada@yahoo.com>
> Reply-To: ronald@my.msuiit.edu.ph
> To: pgsql-sql@postgresql.org
> Subject: [SQL] help me...
>
> Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls...
> Query1:
> SELECT items.description, Sum(supplieditems.qty) AS SumOfqty
> FROM items INNER JOIN supplieditems ON items.itemno = supplieditems.itemno
> GROUP BY items.description;
> Query2:
> SELECT [items].[description], Sum([customer].[qty]) AS SumOfqty
> FROM (items INNER JOIN OtherItem ON [items].[itemno]=[OtherItem].[Itemno]) INNER JOIN customer ON [OtherItem].[Itemno]=[customer].[itemcode]
> GROUP BY [items].[description];
> Query3:
> SELECT [Query1].[SumOfqty], [Query2].[SumOfqty], [Query1]![SumOfqty]-[Query2]![SumOfqty] AS remain
> FROM Query1, Query2;
> I have translated Query1 and Query2 in POSTGRESQL but I don't know how to implement Query3.
>
>
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger



view thread (12+ messages)  latest in thread

Message-ID: <Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu>
Permalink:  ../Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu/
Also on:    postgresql.org/message-id/Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ymalik@heineken.cs.stevens-tech.edu, ronald@my.msuiit.edu.ph
  Subject: Re: help me...
  In-Reply-To: <Pine.LNX.4.58.0311091551070.5237@heineken.cs.stevens-tech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox