Hello!
Can anyone tell me how i do this properly?

create or replace function agg(varchar,varchar) returns void as $func$
        select $1,count(*) from $2 group by $1 order by $1;
$func$
Language SQL;

Right now this wives me "ERROR:  syntax error at or near "$2" at character
97
select $1,count(*) from $2 group by $1 order by $1;"

Thank you!

Reply via email to