Rank in SQL

How to use row_number in SQL | SQL RANK() function | dense_rank SQL

How to rank in SQL

In this blog, we will understand how to rank in SQL your data. We will first understand what is SQL rank function then dense_rank SQL. Then also understand row number SQL. We will first create SQL table and then insert our data to understand these three functions in SQL i.e. rank function SQL, oracle dense_rank, oracle row_number.

SQL CASE WHEN statement

Oracle CASE statement || SQL CASE statement with 2 Example

oracle case statement

The SQL CASE statement is a logical statement that helps in putting values based on logical arguments. The CASE statement goes through conditions and returns a value when the first condition is met. So, once a condition is true, it will stop reading and return the result. If no conditions are true, it returns the value in the ELSE clause. If no conditions meet the criteria then NULL value will return.


Group by SQL function || Group by in SQL with examples

Group by SQL function

Group by in SQL is a function by which we are grouping column values against record groups. It helps in aggregating columns data and getting summary of values. Group by SQL function is a very useful and frequently used SQL function.
The GROUP BY clause groups records into summary rows.
GROUP BY returns one record for each group.
GROUP BY is used with aggregates like COUNT, MAX, SUM, SUM and AVERAGE.

unpivot in sql

Pivot and Unpivot in SQL || How to convert rows to Columns in sql

What is Pivot and Unpivot in SQL

In this article, we will learn about Pivoting and unpivoting data in SQL. But before how to do Pivot and Unpivot in SQL we must understand what is pivot and unpivot in SQL. In SQL Oracle, Pivot and Unpivot are relational operators that are used to transform one SQL table into another SQL  table in order to achieve a simpler view of the data. In simple terms, we can say that SQL Pivot operator converts the unique values from one column values which are in rows into different columns. Basically, it convert rows to columns in SQL. The SQL Unpivot operator does the opposite that is it transforms the different columns into rows identified by these unique columns name in a new column.