Subject Re: [firebird-support] Re: SubQuery Help
Author Dixon Epperson
Yes it does.   I posted a correction but apparently it never made it

Sent via the Samsung GALAXY S®4, an AT&T 4G LTE smartphone

-------- Original message --------
From: "'Martijn Tonies (Upscene Productions)' m.tonies@... [firebird-support]"
Date:09/16/2014 12:16 PM (GMT-05:00)
Subject: Re: [firebird-support] Re: SubQuery Help


I think this needs a
GROUP BY a.Project_PK
With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Sent: Tuesday, September 16, 2014 6:12 PM
Subject: [firebird-support] Re: SubQuery Help

I'd recommend using a left join with table alias.
, SUM(b.cost) AS Sum_of_Cost
, SUM(b.estimate_cost) AS Sum_of_Estimated_Cost
, SUM(c.quantity) AS Sum_of_Quantity
, SUM(c.estimate_quantity) AS Sum_of_Estimated_Quantity
FROM Projects a
LEFT JOIN Cost b ON a.project_pk = b.project_pk
LEFT JOIN Quantity c ON a.project_pk = c.project_pk
Dixon Epperson