Re: A GROUP BY question

2019-08-13 Thread Alban Hertroys
> On 13 Aug 2019, at 15:19, David G. Johnston > wrote: > > On Tuesday, August 13, 2019, Alban Hertroys wrote: > > > On 13 Aug 2019, at 13:10, stan wrote: > > > > select > > project.proj_no , > > Removed columns that get in the way of your desired result. You can’t have > both deta

Re: A GROUP BY question

2019-08-13 Thread David G. Johnston
On Tuesday, August 13, 2019, Alban Hertroys wrote: > > > On 13 Aug 2019, at 13:10, stan wrote: > > > > select > > project.proj_no , > > Removed columns that get in the way of your desired result. You can’t have > both details and the sum over them in a meaningful way. > Sure you can, at l

Re: A GROUP BY question

2019-08-13 Thread Jan Kohnert
Hi Stan, Am Dienstag, 13. August 2019, 13:10:18 CEST schrieb stan: > Maybe I have a basic misunderstanding. What I am trying to get is a total > cost for each project. This would be calculated by multiplying rate and > hours for each row, on a per project base, and then summing all of th > product

Re: A GROUP BY question

2019-08-13 Thread Alban Hertroys
> On 13 Aug 2019, at 13:10, stan wrote: > > select > project.proj_no , Removed columns that get in the way of your desired result. You can’t have both details and the sum over them in a meaningful way. > SUM (rate.rate * task_instance.hours) > from > task_instance > join

Re: A GROUP BY question

2019-08-13 Thread stan
On Tue, Aug 13, 2019 at 05:54:03AM -0400, stan wrote: > I am trying to write, what is for me, a fairly complex query. It uses JOINS, > and also GROUP BY. I have this working with the exception of adding the > GROUP BY clause. > > Is there some reason I cannot add a GROUP BY function to a JOIN? >

A GROUP BY question

2019-08-13 Thread stan
I am trying to write, what is for me, a fairly complex query. It uses JOINS, and also GROUP BY. I have this working with the exception of adding the GROUP BY clause. Is there some reason I cannot add a GROUP BY function to a JOIN? Here is what I have: CREATE OR REPLACE view tasks_view as sele