Re: Group By question
От | Sam Mason |
---|---|
Тема | Re: Group By question |
Дата | |
Msg-id | 20071016150611.GF10098@samason.me.uk обсуждение исходный текст |
Ответ на | Group By question (Jeff Lanzarotta <delux256-postgresql@yahoo.com>) |
Ответы |
Re: Group By question
|
Список | pgsql-general |
On Tue, Oct 16, 2007 at 07:46:34AM -0700, Jeff Lanzarotta wrote: > Hello, > > I have a table that looks something like this: > > SKU Dept Col1 Col2 Col3 > ------- ------ ------- ------- ------ > 1 1 1 2 3 > 2 1 2 3 4 > 3 2 1 0 1 > 4 2 0 1 2 > 5 2 4 1 3 > 6 3 1 2 3 > > I am having a problem trying to get the Is there a query that can do > something like this: > > select sku, dept, (col1 + col2) * col3) from table group by dept What are you expecting the group by to do here? It may be helpful if you show what you expect the output to be. Sam
В списке pgsql-general по дате отправления: