How to get previous row value in sql ?

The most common method to fetch previous row value in SQL is by using the LAG function. The LAG function returns the previous row value. Depending on the order by clause the previous row is determined and the column value […]

Duplicate rows in SQL

Duplicate rows in the table can result in data quality issues. Sometimes it is ok to have duplicate rows in the table as per business requirement. However if the duplicate rows are loaded into the table accidentally you must remove […]