Search Postgresql Archives

catch SELECT statement return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,
i am working on this postgresql statement. it picks up all non-null
values only. is there a way to pickup all hour values (if any hour
value not existing, still find them and assign their value to be 0).
coz my table does not contain all hour values, only ones which have a
non-zero value.

SELECT to_timestamp(to_char (last_edit_timestamp,'YYYY-MM-DD
HH24:00:00'), 'YYYY-MM-DD HH24:00:00')AS edit_time, count(to_char
(last_edit_timestamp,'YYYY-MM-DD HH24:00:00'))
as edit_time_count FROM dbpt_containerlog GROUP BY to_char
(last_edit_timestamp,'YYYY-MM-DD HH24:00:00') ORDER BY to_char
(last_edit_timestamp,'YYYY-MM-DD HH24:00:00');

please help me, all help appreciated. thanks



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux