SQL

Display the cumulative percentage of total sales for each product.

This question was asked in Interview at black rock. Read more Company: BlackRock CTC: 26LPA Source: LinkedIn SQL Interview Question…

1 month ago

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.…

1 month ago

What is Pareto Principle

The Pareto Principle, commonly known as the 80/20 rule, argues that 80% of the results are achieved with 20% of…

1 month ago

Running Total for Different Genders: Write an SQL query to find the total score for each gender at each day

This question was asked in Facebook interview, Ask is to provide Running Total for Different Genders. Source: LeetCode Difficulty: Medium…

1 month ago

SQL LAG function explained!!

Understanding the SQL LAG Function (With Examples) SQL LAG function is a powerful tool that enables you to access data…

1 month ago

Page Recommendations: Write an SQL query to recommend pages to the user

This question was asked in Facebook interview, Ask is to give page recommendation for user1 based on Friendship and Likes.…

1 month ago

Retrieve the name of the manager who supervises the most employees

Company: BlackRock CTC: 26LPA Source: Linked Post Q. Retrieve the name of the manager who supervises the most employees. Solution: SELECT…

2 months ago

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