About this question
I am assigned a task which is related to analyzing data in SQL. In this task, there is a table whose name is “employees” with the following columns: “employee_id” “employee_name” and “salary”. How can I write an SQL query for categorizing employees' salaries based on the categories of low, medium, and high? Here are the following criteria:
If the salary is less than 30000 then it should be counted as low
If the salary is between 30000 and 60000 then it should be counted as medium
If the salary is above 60000 then it should be categorized as high.
The query should retrieve the “employee_name” and their respective category.