Hi Ramesh,
Is there any way we could finish it in a single statement? I'm not sure, many aggregate functions are not available i guess. Like using count(column_nm) with distinct? Or else something on that line because its really a task to loop and would be better if we could finish such things in the select query itself. Is it possible?
Regards,
KS