Hi Hityshi,
Are you looking for an output like this:
Please find the select statement i have used below:
select DISTINCT "Customer ID" AS "Customer_ID","Customer Name" AS "Customer_Name", sum("Amount"), sum("Quantity") from krishna."Customer" group by grouping sets WITH TOTAL ( ("Customer ID", "Customer Name","Amount","Quantity"), ("Customer ID", "Customer Name") )ORDER BY 1 NULLS LAST,2 NULLS LAST
Regards,
Krishna Tangudu