What does CASE WHEN salary > 100000 THEN ‘Senior’ ELSE ‘Junior’ END return?

SQL Data Analyst Medium

SQL Data Analyst — Medium

What does CASE WHEN salary > 100000 THEN ‘Senior’ ELSE ‘Junior’ END return?

Key points

  • CASE WHEN is used for conditional logic in SQL
  • 'Senior' and 'Junior' are the specified outputs based on salary conditions
  • The statement does not filter out or group rows, it assigns values based on conditions

Ready to go further?

Related questions