Tracks/NULLs and CASE
NULLs and CASE
Missing values, COALESCE, and conditional labels.
IS NULL
COALESCE
NULLIF
CASE
0/43 solved
- 1—009. Employees Without a Managereasy
- 2—016. Employees With No Departmenteasy
- 3—017. Salary Tier Labeleasy
- 4—021. Coalesce Missing Department Nameeasy
- 5—116. Return First Available Phone Numbereasy
- 6—117. Avoid Division by Zero with NULLIFeasy
- 7—118. Find Top-Level Employees with No Managereasy
- 8—146. Find Customers Who Have Never Orderedeasy
- 9—306. Find Customers with No Phone Numbereasy
- 10—320. Count NULL Values in a Columneasy
- 11—321. Assign Letter Grades with CASE WHENeasy
- 12—327. Pick the First Non-NULL Name with COALESCEeasy
- 13—037. Products Never Orderedmedium
- 14—050. Order Count by Status (Conditional Aggregation)medium
- 15—063. Count Employees with Missing Salarymedium
- 16—064. Revenue per Unit Sold (Safe Division with NULLIF)medium
- 17—068. Revenue by Category and Order Statusmedium
- 18—070. Products with Zero Total Salesmedium
- 19—081. Account Running Balancemedium
- 20—084. Custom Sort Priority with CASE in ORDER BYmedium
- 21—190. Fill Date Gaps Using GENERATE_SERIESmedium
- 22—202. Find Customers Who Have Never Placed an Ordermedium
- 23—229. Conditional COUNT with CASE Expressionmedium
- 24—231. Compare Each Employee to Their Department Average Salarymedium
- 25—232. Detect Price Changes Using LAGmedium
- 26—234. Classify Employees into Salary Bands Using CASEmedium
- 27—240. Aggregate Orders by Weekday vs Weekendmedium
- 28—248. New vs Returning Customers per Monthmedium
- 29—249. Repeat Purchase Rate Calculationmedium
- 30—253. Sales Velocity — Units Sold per Day per Productmedium
- 31—254. Inventory Days Remaining Calculationmedium
- 32—258. Budget vs Actual Spend Comparisonmedium
- 33—262. Comparing Two Datasets with FULL OUTER JOINmedium
- 34—263. Detecting Anomalies Using Z-Score Approachmedium
- 35—266. Assign Sales to Fiscal Year Quartersmedium
- 36—268. Calculate Age in Years from Birthdatemedium
- 37—278. Transactions More Than 3 Standard Deviations Above Meanmedium
- 38—337. Order Items With No Discount Appliedmedium
- 39—345. Detect Overdue Invoices and Days Latemedium
- 40—093. Median Salary Without PERCENTILEhard
- 41—099. Running Balance with Overdraft Detectionhard
- 42—288. Time-Series Gap Filling with Zero Revenue Dayshard
- 43—289. Monthly Sales Pivot Table (Jan–Dec)hard