Write a query to group employees by age ranges (e.g., 20–30, 31–40) and count the number of employees in each group.

SQL Interview Question: Write a query to group employees by age ranges (e.g., 20–30, 31–40) and count the number of employees in each group.

This question was asked in Interview at black rock. read more Company: BlackRock CTC: 26LPA SQL Interview Question Question Q. Write a query to group employees by age ranges (e.g., 20–30, 31–40) and count the number of employees in each group. Solution age-range num_employee 21-30 7 31-40 6 41-50 5 51-60 2 View on DB … Read more

Write a query to calculate the median salary of employees in a table.

calculate the median salary of employees in a table

Company: BlackRock CTC: 26LPA Source: Linked Post Q: Write a query to calculate the median salary of employees in a table. Solution: Explanation: Here we need to find out the median salary from the employees table. To calculate the median salary, we need some essential information, like the total number of employees in the table. … Read more