Subject Re: [firebird-support] Re: Crosstab
Author Jason Dodson
'Group By' by itself may not be sufficient. I know there are hoops we have to jump through here to group by a date,
because the time is almost always different. You would need something like:

Select (Extract(Month from MyDate) || '/' || Extract(Day from MyDate) || '/' || Extract(Year from MyDate)) as
JustTheDate, count(Extract(Month from MyDate) || '/' || Extract(Day from MyDate) || '/' || Extract(Year from MyDate))
From MyTable
Group By 1

Jason

Adam wrote:
> --- In firebird-support@yahoogroups.com, "ra8009" <ra8009@...> wrote:
>> I have a table with a date and a category. I want to query a count of
>> the date occurences by category. Is there an easy way to do this?
>>
>
> google the syntax for 'group by'
>
> Adam
>
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


--
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.