How to use a CTE in SQL
![What is a SQL CTE](https://www.selectdistinct.co.uk/wp-content/uploads/2023/12/Designer-1024x1024.png)
Introduction – What is a CTE in SQL? CTEs in SQL are a way to simplify code by creating a temporary dataset, giving it a name, then referencing that dataset later in your query You can use Common Table Expressions (CTEs) as temporary named result sets within a SELECT, INSERT, UPDATE, or DELETE statement. You […]
PIVOT function in SQL
![How to use the PIVOT function in SQL](https://www.selectdistinct.co.uk/wp-content/uploads/2023/05/Pivot-function-in-SQL-SQ.png)
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 […]
Drag and Drop Field Names in SQL (SSMS)
![Drag and Drop field names in SSMS cover](https://www.selectdistinct.co.uk/wp-content/uploads/2023/01/SQL-Tips-Drag-ad-Drop-Field-Names-in-SSMS-S.jpg)
Drag and drop is a common and convenient way to move data and objects in SQL Server Management Studio (SSMS). With the object explorer, you can easily drag field names from a table. Then drop them into a query window to quickly create a SELECT statement. How to drag and drop field names in SQL […]
Top 5 SQL Time savers of 2022
![Top 5 SQL Timesavers videos for 2022 title screen](https://www.selectdistinct.co.uk/wp-content/uploads/2022/12/Screenshot-2022-12-22-155512.jpg)
Here are our top 5 SQL Time saver videos on YouTube for 2022 based on the most watched Number 5 How to quickly add comma separators in SQL First published on 13th December 2022 This video demonstrates a free tool to add commas to a list of field values. The video shows this being used […]