From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Group by minute |
Date: | 2006-09-22 14:56:02 |
Message-ID: | 1158936962.5218.4.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Fri, 2006-09-22 at 10:52 -0300, Ezequias Rodrigues da Rocha wrote:
> Hil list,
>
> I have a query but my IDE (Delphi) does not accept "to_char"
> capability. Is there a way to reproduce the same query without using
> to_char function ?
>
> Here is my query:
> SELECT to_char(quando,'dd/MM/yyyy HH24:MI'),count(id)
> FROM base.tentativa
> WHERE (SESSAO_ID = 15)
> GROUP BY to_char(quando,'dd/MM/yyyy HH24:MI')
> order by 1
>
Assuming that your IDE has the same issues with date_trunc, you could
always put things into a view...
in psql do something like:
create view frozen_caveman_ide as
SELECT to_char(quando,'dd/MM/yyyy HH24:MI'),
count(id) FROM base.tentativa
GROUP BY to_char(quando,'dd/MM/yyyy HH24:MI');
then just call the view when you need that.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2006-09-22 17:28:41 | Re: nested select within a DISTINCT block |
Previous Message | Mezei Zoltán | 2006-09-22 14:14:41 | Re: Group by minute |