select custid, count(vendid) as c415 from cv where vendid = 415 group by custid
[...]
Is there a better way (by creating an aggregate function, perhaps)
You may find crosstab in the tablefuncs extension to be of use.
David J.
select custid, count(vendid) as c415 from cv where vendid = 415 group by custid
[...]
Is there a better way (by creating an aggregate function, perhaps)