Ezequias Rodrigues da Rocha wrote:
Hil list,That seems like a valid query in Oracle :-) Postgres have a slightly different mechanism for handling date and time. The modified query: SELECT date_trunc('minute', quando),count(id) FROM base.tentativa WHERE (SESSAO_ID = 15) -- GROUP BY to_char(quando,'dd/MM/yyyy HH24:MI') GROUP BY date_trunc('minute', quando) order by 1 You should read: http://www.postgresql.org/docs/8.1/interactive/functions-datetime.html Zizi |
- [SQL] Group by minute Ezequias Rodrigues da Rocha
- Re: [SQL] Group by minute Niklas Johansson
- Re: [SQL] Group by minute Mezei Zoltán
- Re: [SQL] Group by minute Scott Marlowe
- [SQL] How to autoincrement a primary ... Doug Hyde
- Re: [SQL] How to autoincrement a ... Richard Broersma Jr
- Re: [SQL] How to autoincremen... Andrew Chilton
- Re: [SQL] How to autoincremen... Thomas Kellerer
- Re: [SQL] How to autoinc... Aarni Ruuhimäki