Hello,
I am tring to write sql to find the quarter for a date field and would like the results by quarter along with member count.
So i have a date field from a table. I am getting messed up using the extract function to get the month from the date field and then finding the quarter it belongs too. Any help would be appreciated.
Select extract((month from aDate) +2/3 'MM'), count(member_key) from tablename ; the extract part is supposed to give me the quarter from the date field but its not correct. I havent found anything good on the web to help me get it correct.
Thanks.
I am tring to write sql to find the quarter for a date field and would like the results by quarter along with member count.
So i have a date field from a table. I am getting messed up using the extract function to get the month from the date field and then finding the quarter it belongs too. Any help would be appreciated.
Select extract((month from aDate) +2/3 'MM'), count(member_key) from tablename ; the extract part is supposed to give me the quarter from the date field but its not correct. I havent found anything good on the web to help me get it correct.
Thanks.