2023.08.25-08.30AM-SQL - BQ-Windows Function (Rank, Dense - Rank, Row - Number)
2023.08.25-08.30AM-SQL - BQ-Windows Function (Rank, Dense - Rank, Row - Number)
Rank() --> To find out rank based on a particular column we can use Rank function
Rank() over(order by columnname asc) --> It will ranks from lowest value to highest
values
Rank() over(order by columnname desc) --> It will ranks from highest value to
lowest values
If you want to find our rank for a particular partition --> Partiton by
*******************************************************************************
Dense_RANK():
Both Rank and Dense_Rank are going to work in same way. Only difference if column
is having duplicate values in that situation rank() and dense_rank() with givve
different kind of results.
while using rank function --> if rank column is having any duplicates, it will
populate duplicate rank values by skipping the ranks
while using dense_rank function --> if desne rank column is having any duplicates,
it will populate duplicate rank values with out skipping the ranks
Row_num() --> Whenever you want to populate sequence values then we can use
row_num() function
==> sum with current record and previous 2 records and next 2 records:
***********************************************************************************
**
real time
Banking projects
Loan
EMI
insurance projects
Sum in the combiantion of preceeding and foloowing and over --> window function
sum --> aggregate function
***********************************************************************************
*************
2 3 mins -->
Bigquery --> Usecase to you --> please work on this usecase by today EOD [1 or 2
hours]
If we are going to work in real time --> whether any one will explain requirement
to you
Complete usecase
Mock interviews [you will get your slot time, admin team will call you and they
will inform your slot time]
Classes
***********************************************************************************
*************
Dont worry about below things, I wil take care. Old batch people dont expect to
complete classes ASAP, I need to take care of New batch people also.
1. new topic
2. when I am going to complete classes
3. whether all the topics are covered or not
4. we have only 20 days can we cover all the topics