interview questions

Write a query to 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…

2 months ago

Identify products that were sold in all regions.

Query: SELECT product_id FROM sales GROUP BY product_id HAVING COUNT(DISTINCT region_id) = (SELECT COUNT(*) FROM regions); Explanation: We need to…

2 months ago