On Saturday, July 17, 2021, Firthouse banu <penguinsfairy(at)gmail(dot)com> wrote:
>
>
> Can anyone write query to get this desired output from table one in
> Postgres please.
>
>
No, but I’ll point you in a useful direction.
https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES
David J.