SQL & BI

Blog Post

RANKING Function in plain SQL

Below examples will show that we can still write a pure sql query for RANK, DENSE_RANK and ROW_NUMBER without using RANK() function.DECLARE @StudentScore TABLE(StudentName VARCHAR(1),StudentScore INT)INSERT  @StudentScore VALUES ('A',85),...

2012-06-11

45 reads

SQL Azure Federation

 What is Federation?

Federation is a database object like other objects such as tables, views, stored procedures or triggers.
It is also known as Sharding.
There can be multiple federations in a database.
It is...

2012-04-25

372 reads

Blog Post

SQL Azure Federation

 What is Federation?
Federation is a database object like other objects such as tables, views, stored procedures or triggers.It is also known as...

2012-04-25

838 reads

Blog Post

CONCAT in SQL 2012

SQL Server 2012 introduces a brand new string function called CONCAT(). CONCAT() string function allows you to concatenate up to 255 string or variable values in to one single...

2012-04-20

66 reads

Blog Post

CONCAT in SQL 2012

SQL Server 2012 introduces a brand new string function called CONCAT(). CONCAT() string function allows you to concatenate up to...

2012-04-19

464 reads

Blogs

AI Step 1

By

As this is an Artificial Intelligence (AI) World, things are changing. We can see that...

Beginner’s Guide: Building a Dockerized Todo App with React, Chakra UI, and Rust for Backend

By

In a containerized app, React and Chakra UI provide a robust and accessible user...

A New Word: Nachlophobia

By

nachlophobia – n. the fear that your deepest connections with people are ultimately pretty...

Read the latest Blogs

Forums

Call dynamic sql storedprocedure from SSIS execute sql task

By komal145

hi, I have a table called Rules Create table Rules ( Id int ,...

Migrating database with many orphan users.

By JasonO

I am currently upgrading a very old database running SQL Server 2008 to SQL...

Active and Active Cluster

By shiv-356842

Hi Team, I am planning to apply security updates for SQL Server 2016 on...

Visit the forum

Question of the Day

The Funny SELECTs

What is returned from this query?

SELECT
  ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh
    WHERE soh.OrderDate >= '01/01/2011' AND soh.OrderDate < '01/01/2012') AS OrdersIn2011
, ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh
    WHERE soh.OrderDate >= '01/01/2012' AND soh.OrderDate < '01/01/2013') AS OrdersIn2012
, ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh
    WHERE soh.OrderDate >= '01/01/2013' AND soh.OrderDate < '01/01/2014') AS OrdersIn2013;

See possible answers