次のような構造のテーブルがあります
id cust_id target month year fiscal_ID
1 234 50 4 2013 1
2 234 50 5 2013 1
3 234 50 6 2013 1
4 234 150 7 2013 1
5 234 150 8 2013 1
6 234 150 9 2013 1
次のように結果を取得する必要があります
cust_id target quarter year fiscal_ID
234 150 Q1 2013 1
234 450 Q2 2013 1
第 1 四半期に 4、5、6 か月、第 2 四半期に 7、8、9 か月など