From 8335dbe7c6943367d3e1a59f17875ec9c3d85063 Mon Sep 17 00:00:00 2001 From: AdityaTharunJ Date: Wed, 3 Jun 2026 13:12:07 +0530 Subject: [PATCH] Modify query to show NULL for non-special products --- SQL Deep Dive/NULLIF/questions.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL Deep Dive/NULLIF/questions.sql b/SQL Deep Dive/NULLIF/questions.sql index 333180b..9a86cd9 100644 --- a/SQL Deep Dive/NULLIF/questions.sql +++ b/SQL Deep Dive/NULLIF/questions.sql @@ -4,6 +4,6 @@ * Question: Show NULL when the product is not on special (0) */ -SELECT * -FROM products +SELECT prod_id, title, price, NULL IF(special,0) as "Special" +from products;