devxlogo

SQL

The SQL Intersect Operator

The SQL Intersect operator returns distinct rows that are output by both the left and right input queries operator. SELECT expression1, expression2, … FROM tablesINTERSECTSELECT expression1, expression2, … FROM tables

Using the SQL MINUS Operator

The SQL MINUS operator makes use of two SQL statements. It takes all the results from the first statement and subtracts out the ones that are present in the second

Skip Weekends SQL Function

Certain reports need to show data that excludes data from weekends. There is a couple of ways to approach this. You could create a Calendar table, but sometimes you do

Doing Upserts with the Help of MERGE

There will be times that you encounter a situation where you have to update a row, if it exists, or create a new row if the certain data is not

PIVOTing Data in SQL

You can use the PIVOT SQL command to transpose Row data into Column data. This means that you can take a set of rows and make fields out of them!