I have table with followings columns.
Emp name,emp id,emp ph no
X,1,99
X,2,10
Y,2,30
Output:
x,1,(99,10)
Based on emp name and order by emp Id form the phone array
Query:
select emp-name,array_agg(emp_phno order by emp_id) from emp
Error:
function array_agg called with an invalid number or type of parameters
What is the problem, and how can I fix it?