> I think the problem in here is that you want to collect the first and
last values in the same row
Your idea is ok, but it just postpone the problem. And I need the result
within the DB for further calculations /aggregations.
What I need is really something like:
test=# SELECT foo.ts, foo.g
On Mon, 26 Jan 2009, "Marc Mamin" writes:
> create table test
> (
> time int8, --store the time as epoch
> a_group varchar,
> category varchar
> )
>
> ...
>
> SELECT
> FIRST.a_group,
> FIRST.time as first_time,
> FIRST.category as first_category,
> LAST.time as last_time
Hello,
I have a query to aggregate data wich is too slow :-)
Here a simplified example:
create table test
(
time int8, --store the time as epoch
a_group varchar,
category varchar
)
For each group, I need the first/last times and categories , the number
of distinct categories
LinkedIn
Suha Onay requested to add you as a connection on LinkedIn:
--
Marcin,
I'd like to add you to my professional network on LinkedIn.
- Suha
View invitation from Suha Onay
http://www.linkedin.com/e/XCcEdFwZmSzO1q19PFca3OmGtDdI_FirNbrhE