Re: [GENERAL] An example for WITH QUERY

2011-06-22 Thread Thomas Kellerer
Durumdara, 22.06.2011 12:35: Hi! I have 3 tables. I want to run a query that collect some data from them, and join into one result table. I show a little example, how to do this in another DB with script: with tmp_a as ( select id, name, sum(cost) cost from items ... ), temp_b as ( s

Re: [GENERAL] An example for WITH QUERY

2011-06-22 Thread Allan Kamau
On Wed, Jun 22, 2011 at 1:35 PM, Durumdara wrote: > Hi! > > I have 3 tables. I want to run a query that collect some data from > them, and join into one result table. > > I show a little example, how to do this in another DB with script: > > create temp table tmp_a as select id, name, sum(cost) co

[GENERAL] An example for WITH QUERY

2011-06-22 Thread Durumdara
Hi! I have 3 tables. I want to run a query that collect some data from them, and join into one result table. I show a little example, how to do this in another DB with script: create temp table tmp_a as select id, name, sum(cost) cost from items where... group by id, name with data; create temp