Find a largest single number in a table
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
![]()
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
![]()
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 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
![]()
SQL delete statement is used to delete records from table based on specific conditions which are specified in where clause. Delete statement can also be… Read More »SQL Delete TOP
![]()
Sometime you are required to validate the row counts for each tables in database. So getting a row counts for each tables either through using… Read More »Get Row Counts for all tables in SQL Server
![]()
SQL Server Cross Apply and Outer Apply
SQL Server APPLY operator is like a SQL JOINS, which allows joining two table expressions, but the Difference between APPLY operator and JOINS is the ability of APPLY operator to work with table- valued expression.
![]()
Query to Get the Students who scored higher than 80 Marks ?
![]()
SQL Server IF..ELSE block is a control-of-flow that allows you to execute or skip a statement block based on a specified condition.
SYNTAX
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]
SYNTAX
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]
![]()
How to get the sizes of all databases on a SQL Server ?
![]()
SQL interview question and answer on Substring function
![]()
Q 1 > SELECT Count(1) as Output 1> NULL 2> Error 3> 1 4> Invalid select statement Answer Q 2 > SELECT Count(*) as… Read More »SQL Q & A on SELECT Statement
![]()