This article helps you understand how to calculate the running average and cumulative average on a given data set. As discussed earlier, windowing functions
Category: SQL Server
SQL Server Administration, Development and Maintenance
Concatenate rows (group concatenation) in MySQL, Hive, SQL Server and Oracle
The CONCAT() function joins the input strings or different column values and returns as a single string. However, if we need to concatenate rows of
DISTINCT vs APPROXIMATE DISTINCT
As all (or most) of us know, SELECT DISTINCT eliminates duplicate records from the results and returns only unique values. But it’s very expensive in
Creating Table From Existing Table in Hive, Impala, SQL Server, Oracle SQL*Plus, PostgreSQL and MySQL
In some scenarios we may need to create a table based on the existing ones. Sometimes we may need the table along with the data
Best Usage of NTILE function in SQL Server and other RDBMSs
SQL Server NTILE() is a window function that distributes rows of an ordered partition right into a unique quantity of approximately same partition or group
Multiple Ways to Find Missing Serial Numbers in SQL
In my previous blogs, I had mentioned that there will be many ways to solve a problem. The below is one more example. Often, in