help me... - Mailing list pgsql-sql

From ron_tabada
Subject help me...
Date
Msg-id 20031108060215.7557.qmail@web14605.mail.yahoo.com
Whole thread Raw
Responses Re: help me...
List pgsql-sql
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

pgsql-sql by date:

Previous
From: Yasir Malik
Date:
Subject: Re: DateDiff in PostgreSQL
Next
From: Cris Carampa
Date:
Subject: transaction management in plpgsql functions