• This topic is empty.
Viewing 1 post (of 1 total)
  • More SQL help,
  • mrmo
    Free Member

    select count (distinct accountid) as NumCust,dateadd(quarter,datediff(QUARTER,0,ccx_cog_invoicedate),0) as FirstOfQuarter
    from FilteredSalesOrder
    group by
    dateadd(quarter,datediff(QUARTER,0,ccx_cog_invoicedate),0)

    I wrote this query to get a count of customers in a quarter, but what i need is slightly different, I need to be able to group by a three month period starting the first of a month. I assume that there is a way to do it???

    Anyone able to offer some help? thanks.

Viewing 1 post (of 1 total)

The topic ‘More SQL help,’ is closed to new replies.