Skip to content

Database.Guide

mssql

The Difference Between LEAST() and MIN() in SQL Server

November 28, 2023 by Ian

SQL Server 2022 introduced the LEAST() function, which at first glance, may seem to do the same thing as the already existing MIN() function.

However, these are two separate functions with two separate purposes.

Read more

Categories SQL Server Tags functions, mssql, t-sql, what is

Overview of the VARP() Function in SQL Server

November 27, 2023 by Ian

In SQL Server the VARP() function returns the statistical variance for the population for all values in the specified expression.

Read more

Categories SQL Server Tags aggregate functions, aggregation, functions, mssql, t-sql, what is

Understanding the VAR() Function in SQL Server

November 25, 2023 by Ian

In SQL Server the VAR() function returns the statistical variance of all values in the specified expression.

Read more

Categories SQL Server Tags aggregate functions, aggregation, mssql, t-sql, what is

A Quick Overview of SQL Server’s STDEVP() Function

November 22, 2023 by Ian

In SQL Server the STDEVP() function returns the statistical standard deviation for the population for all values in the specified expression.

Read more

Categories SQL Server Tags aggregate functions, aggregation, functions, mssql, t-sql, what is

How to Select the Date Column with the Latest Date in SQL Server

November 21, 2023 by Ian

Suppose you have a query that returns multiple date columns, and suppose you want to return the latest date, regardless of which column it came from.

As from SQL Server 2022 we can use the GREATEST() function to easily achieve this outcome.

Read more

Categories SQL Server Tags dates, how to, mssql, t-sql

Understanding the STDEV() Function in SQL Server

November 20, 2023 by Ian

In SQL Server the STDEV() function returns the statistical standard deviation of all values in a specified expression.

So we can use this function to get the standard deviation of all values in a column.

Read more

Categories SQL Server Tags aggregate functions, aggregation, functions, mssql, t-sql, what is

An Introduction to SQL Server’s GROUPING_ID() Function

November 18, 2023 by Ian

SQL Server has a GROUPING_ID() function that returns the level of grouping based on its arguments.

We pass one or more column expressions to the function, and it computes the level of grouping. The column expressions must match the ones provided by the GROUP BY clause.

Read more

Categories SQL Server Tags aggregate functions, aggregation, functions, mssql, t-sql, what is

Understanding GROUPING SETS() in SQL Server

November 14, 2023 by Ian

When using the GROUP BY clause in SQL Server, we can use the GROUPING SETS() option to combine multiple GROUP BY clauses into one GROUP BY clause. When we do this, the results are the equivalent of doing a UNION ALL of the specified groups.

Read more

Categories SQL Server Tags aggregate functions, aggregation, mssql, t-sql, what is

How GROUP BY CUBE() Works in SQL Server

November 14, 2023November 13, 2023 by Ian

SQL Server provides GROUP BY CUBE() functionality that we can use in our SQL queries, which creates groups for all possible combinations of columns.

It’s similar to the GROUP BY ROLLUP() functionality, except that it can provide us with more information, due to the fact that it groups all possible combinations.

Read more

Categories SQL Server Tags aggregate functions, aggregation, mssql, t-sql, what is

Understanding GROUP BY ROLLUP() in SQL Server

November 14, 2023November 11, 2023 by Ian

When we use the GROUP BY clause in SQL Server, we have several options for specifying how the GROUP BY operation is applied. One such option is the ROLLUP modifier. We can use this modifier to create subtotals and grand totals.

Read more

Categories SQL Server Tags aggregate functions, aggregation, mssql, t-sql, what is
Older posts
Newer posts
← Previous Page1 … Page32 Page33 Page34 … Page114 Next →

About | Privacy Policy

© 2026 Database.Guide • All rights reserved