Search Postgresql Archives

Re: Select/Group by/Order by question

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

 



> How about:
> 
>     select  to_char(mtrantime,'mm-dd hh AM') as datetime,
>     to_char(mtrantime,'AM') as sort_field,
>     count(*) as tot from memtran
>     group by sort_field, datetime
>     order by sort_field, datetime;
> 
> Then ignore the sort_field column?

I usually don't like to send managers reports with data labeled
'ignore this column'.  :-)

With Tom's help, I found a solution.
--
Mike Nolan

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[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