SQL Cricket Team Ranking Based on Points
Problem Statement A cricket tournament is played between multiple teams. Winning team gets +1 point Losing team gets –1 point We need to calculate total… Read More »SQL Cricket Team Ranking Based on Points
![]()
A Series of SQL Server basics to advanced level SQL Interview questions and answers that are commonly asked in interivew.
Problem Statement A cricket tournament is played between multiple teams. Winning team gets +1 point Losing team gets –1 point We need to calculate total… Read More »SQL Cricket Team Ranking Based on Points
![]()
Write a SQL query to: Find the top 2 highest-paid employees in each department. Show their ranking based on salary within the department. Also calculate… Read More »Finds the top two highest-paid employees in each department
![]()
Sometimes, we need to calculate the difference between the values of the current row and the previous row in a table or you can say… Read More »Compare the values of current row with previous row in SQL
![]()
How would you extract the display name and URL from a string in the format [display_name](url)? For example: Let’s say for string [abc](https://www.sqlskull.com), how would… Read More »Extract URL and display name from string
![]()
This is one of the most asked SQL interview question find the the numbers that appear at least three times consecutively. As, you can see… Read More »Find the numbers that appear at least three times consecutively
![]()
Write a SQL query to find a top 3 highest paid employees in each of the department. As you , here we have two tables… Read More »Find department top 3 salaries
![]()
Write a SQL query to find a largest single number in a table where single number is a number that appeared only once in the… Read More »Find a largest single number in a table
![]()
SQL query to find manager who have at least 3 direct reports. Here, we have a sample table named Employee. Create table Employee (Id INT,… Read More »Find a managers with at least 3 direct reports
![]()
HackerRank SQL Interview Question: Level Medium Source: HackerRank Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output column headers… Read More »HackerRank SQL interview Question- Occupations
![]()
SQL (Structured Query Language) is a programming language, It is used for managing and manipulating relational databases using various command such as DDL (Data Definition… Read More »SQL DDL, DML, DCL and TCL commands
![]()
The major difference between the UNION and UNION ALL operators in SQL is how they handle duplicate rows when the result set of multiple select… Read More »Difference between union and union all
![]()
This is one of the most asked SQL interview Question that write a SQL Query to display Employees and Manager name of the employee. Let’s… Read More »Display employees and their manger name in SQL
![]()
A series of SQL most asked interview questions and answers for freshers and experienced professionals will help you prepare and cracking SQL interview. LeetCode –… Read More »SQL Interview Questions
![]()
An identity column in table generates key values automatically based on the current seed and increment, and the benefit of creating an identity column is… Read More »Reset Identity column value
![]()
Write an SQL query to report the nth highest salary from the Employee table. If there is no nth highest salary, the query should report null. Source:… Read More »SQL Leet Code Nth Highest Salary Problem
![]()
SQL LeetCode problem: Rank Scores Source: LeetCode Write an SQL query to rank the scores. The ranking should be calculated according to the following rules:… Read More »SQL LeetCode Rank Scores Problem
![]()
This article demonstrates how to Convert multiple rows into a single comma separated row, it can be done by using in-built SQL functions. As you… Read More »How to get multiple rows data in single row in SQL
![]()
Rolling average is a calculation to analyze data by creating series of average of different subsets of the entire data. For example, you have data… Read More »Rolling average in SQL
![]()
To find the highest salary of employee in each department, first we will create a sample tables named EmployeeDetails and Department as shown below. CREATE… Read More »How to get top salary of each department
![]()
There are multiple ways to get the size of table in SQL Server. Lets take a look on them one by one. Using sp_spaceused system… Read More »How to get the size of table in SQL
![]()