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
Category: Cloudera Impala
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
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
Analytical & Window Functions
Please refer to my previous post, in which schema and data for EMP and DEPT tables available. The topic of this post is SQL Server
Oracle SQL Emp and Dept Tables For SQL Server
Below are Oracle’s most popular “emp” and “dept” tables compatible with SQL Server. — Table definition – Dept CREATE TABLE Dept( DeptNo INT, DName VARCHAR(14),