Re: SELECT on a table with Time values

Поиск
Список
Период
Сортировка
От Dann Corbit
Тема Re: SELECT on a table with Time values
Дата
Msg-id D425483C2C5C9F49B5B7A41F8944154702961FA1@postal.corporate.connx.com
обсуждение исходный текст
Ответ на SELECT on a table with Time values  (Anderson dos Santos Donda <andersondonda@gmail.com>)
Список pgsql-general

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Anderson dos Santos Donda
Sent: Wednesday, February 04, 2009 12:05 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] SELECT on a table with Time values

 

Hi all!!

I have a simple table with two column. The first column is a time type and the other is a integer type. This table have datas from each minute of day.

Example : 15:00:00, 15:01:00, 15:02:00 etc...

I want a SELECT command  wich return for me the datas from each five minutes of day.

Example: 15:00:00, 15:05:00, 15:10:00, 15:15:00 etc


There is a way to do this?

>> 

How about:

SELECT integer_column, timestamp_column FROM my_table

WHERE EXTRACT(MINUTE FROM timestamp_column) % 5 = 0

<< 

В списке pgsql-general по дате отправления:

Предыдущее
От: Anderson dos Santos Donda
Дата:
Сообщение: SELECT on a table with Time values
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: case sensitive db name?