I have a table like this
SA_ID ---+---Acct_Id---+---SA_Type
101 111 TYPE1
102 111 TYPE2
103 112 TYPE1
I have a query to get acct_id having more than one sa_type
select acct_id,count(*) from sa_tbl
having count(*) > 1
group by acct_id;
I get a result like this
acct_id ---+---count(*)
111 2
But I need to get the result like this:
acct_id ---+---count(*)-----+sa_type1----+---sa_type2
111 2 TYPE1 TYPE2