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
Calculating “Approximate Median” in Cloudera Impala, Apache Hive, SQL Server, Oracle and MySQL
APPROX_MEDIAN is an approximate inverse distribution function that accept a nonstop/continuous dispersion model. It takes a numeric or datetime value and returns an estimated middle
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
Handling “Json” and “Unstructured” Data in SQL
The below is to understand how we can handle JSON data in prior versions of SQL Server 2016. Sample JSON data is: {“accountNumber”: 2020112,
Logical vs Physical Computed Columns
Many people have asked me about the difference between using and not using ‘PERSISTED’ in a computed column; and how do we know whether the