Question: SELECT product _ id , COALESCE ( product _ type, 'Unknown' ) AS product _ type, COALESCE ( brand , 'Unknown'

SELECT
"product_id",
COALESCE("product_type", 'Unknown') AS "product_type",
COALESCE("brand", 'Unknown') AS "brand",
--COALESCE("weight",(SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY "weight") FROM products))::numeric(10,2) AS "weight",
COALESCE("price", PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY "price")::numeric AS "price",
COALESCE("average_units_sold", 0) AS "average_units_sold",
COALESCE("year_added", 2022) AS "year_added",
COALESCE("stock_location", 'Unknown') AS "stock_location"
FROM
products;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!