Postgresql – Postgres PIVOT table on aggregated count
I am trying to create a pivot table in Postgres from the following table named product_info: CREATE TABLE product_info ( ID varchar(10), date VARCHAR(20) NOT NULL, product VARCHAR(20) NOT NULL, product_cost integer ); INSERT INTO product_info(ID, date, product, product_cost) VALUES…