Group by ROLLUP function in SQL Server
Introduction to ROLLUP in SQL Server Did you know that there is a simple way to add roll up sub totals in SQL Server? SQL ROLLUP is an extension of the GROUP BY clause in SQL, providing a way to generate subtotals and grand totals for multiple dimensions within a dataset. It enables analysts to […]
Debugging Joins in SQL
Debugging Joins in SQL Joining tables is a powerful feature in SQL that allows you to combine data from multiple tables into a single result set. However, it can sometimes be challenging to get the desired output when working with joins. In this blog post, we will discuss some common issues that arise when debugging […]
SQL Coalesce Function
An Introduction to the SQL COALESCE function The SQL COALESCE function is a simple, efficient function to handle NULL values in your SQL queries This quick guide shows you how it works, how it compares to using some alternative approaches and common use cases The SQL COALESCE function returns the first non-null value in a […]
UNPIVOT Function in SQL
How to Unpivot a Table in SQL Server The Power of the Unpivot function in SQL : How to Convert Columns into Rows in SQL Server with One Simple Operator Have you ever encountered a table that has too many columns and not enough rows? A table that looks like this: This […]
PIVOT function in SQL
Introduction to the PIVOT function in SQL The PIVOT function in SQL can be used to create a dataset with aggregated rows from a list of data This post shows you how to transform a table of data like this Into a summary table of data with a column representing each month If you are […]
CASE statements in SQL
What are Case Statements in SQL Case statements are a very powerful tool for an analyst Allowing you to add your own dynamic data classification, cleanse and structure data In SQL, CASE statements allow you to check for various conditions and return a value if a condition is met. CASE statements always begin with the […]
Change The Column Order in SQL Output
Did you know that you can easily change the column order in the SQL output grid in SQL Server Management Studio This nano tip shows you one of the hidden features you may not know about in SQL Server Management Studio (SSMS) Have you ever run a query, then wished you had specified the columns […]
How to split a column in SQL Server
This quick guide shows you how to split a column in SQL Server This can be a very common problem, but with a few commands it is easily achieved The guide shows you step by step how to split one column into multiple columns in SQL Server. You can copy the code and work through […]
The Select Distinct Statement in SQL
One of the most useful functions in SQL is the SELECT DISTINCT statement *The SQL function which inspired our company name Introduction to the SELECT DISTINCT statement in SQL The SELECT DISTINCT statement is used to return only unique values from a table. Inside a table, a column often contains many duplicate values, and sometimes […]
Double and Triple-Click in SQL Server
Double and Triple-Click in SQL Server are two very useful shortcuts to save you time and reduce errors This is one of the simplest and possibly most frequent timesavers we use in SQL Server Using Double-Click in SQL Double click is a SQL server shortcut that can save you time and effort when writing SQL […]