| From: | sconeek(at)gmail(dot)com |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | catch SELECT statement return |
| Date: | 2006-03-13 23:28:06 |
| Message-ID: | 1142292486.663232.58990@e56g2000cwe.googlegroups.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2006-03-13 23:50:44 | Re: Wisconsin Circuit Court Access (WCCA) on |
| Previous Message | Emi Lu | 2006-03-13 22:55:54 | Re: [GENERAL] Update value to "the first character is capital |