Re: [GENERAL] Select/Group by/Order by question

2004-04-09 Thread Mike Nolan
> 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

Re: [GENERAL] Select/Group by/Order by question

2004-04-09 Thread Michael Fork
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? Michael "Mike Nolan" <[EMAIL PROTECTED]> wrote