SQL Exercise – 20
SQL Exercise: Retrieve a list of all tables along with the number of rows in each table in SQL Server. Soluton: To retrieve a list… Read More »SQL Exercise – 20
![]()
SQL Exercise: Retrieve a list of all tables along with the number of rows in each table in SQL Server. Soluton: To retrieve a list… Read More »SQL Exercise – 20
![]()
SQL Exercise: Retrieve the Top and Bottom 2 Sales Scenario: You have a SalesData table with the following columns: SalesID (unique identifier for sales records)… Read More »SQL Exercise – 19
![]()
SQL Exercise: You are given an Employee table containing details about employees, their departments, and their salaries. Your task is to write an SQL query… Read More »SQL Exercise – 17
![]()
SQL Exercise: A company tracks sales data on a monthly basis and wants to calculate the percentage growth or decline in sales for each product… Read More »SQL Exercise – 15
![]()
SQL Exercise: You are given a table of ticket data that includes the TicketID, OpenDate, and CloseDate. The task is to generate a new row… Read More »SQL Exercise – 13
![]()
SQL Exercise: You are provided with a table of employees containing their names, departments, and salaries. Write a query to determine the applicable tax rate… Read More »SQL Exercise – 12
![]()
SQL Exercise: You are given a table containing a list of departments and employees. Write a query to concatenate all employee names for each department… Read More »SQL Exercise – 9
![]()
SQL Exercise: Given a table Sales that records sales data for various products across multiple months, write a query to dynamically pivot the data such… Read More »SQL Exercise – 11
![]()
SQL Exercise: You are provided with a table Sales that records monthly sales data for various products. Write a query to transform the data such… Read More »SQL Exercise -10
![]()
SQL Exercise: You are given two tables: Employees and Departments. Write a query to find the highest-paid employee in each department. If a department does… Read More »SQL Exercise – 7
![]()
SQL Exercise: Suppose you have a Sales table that tracks product sales data, including the sale amount, product category, and sale date. You want to… Read More »SQL Exercise – 6
![]()
SQL Exercise: You have a Sales table that tracks product sales in different cities for various dates. Now, you have to get the following information.… Read More »SQL Exercise – 5
![]()
SQL Exercise: Write Query to: Find all customers with the last name “Singh”. Retrieve customers whose email address contains the word “kumar”. Retrieve customers living… Read More »SQL Exercise – 4
![]()
SQL Exercise: Write a query to find the top 3 cities by total sales revenue, including: The total revenue for each city. The number of… Read More »SQL Exercise – 3
![]()
SQL Exercise: Write a query to find the following details for each department: The total hours worked by employees on all projects. The number of… Read More »SQL Exercise – 2
![]()
Query: Write a query to find the name of each employee, their department name, their manager’s name, and the total budget of the projects their… Read More »SQL Exercise – 1
![]()