Blogs

Lukáš Karlovský: I got the green light from management and built Fabric specialization from scratch

By

The post Lukáš Karlovský: I got the green light from management and built Fabric...

FIRST_VALUE vs. Min: #SQLNewBlogger

By

I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter...

Read the latest Blogs

Forums

Transparent Data Encryption (TDE) on AlwaysON Availability Group

By ABOAMAH90

I’ve been tasked with securing SQL Server data and log files (MDF and LDF)...

The Phoenix Project: A Graphic Novel about IT, DevOps, and Helping Your Business Win

By Site Owners

Comments posted to this topic are about the item The Phoenix Project: A Graphic...

change server connection

By mtz676

I have a one database and one table in that database. This is on...

Visit the forum

Question of the Day

More Funny SELECTs

What does this code return?

SELECT
  ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2011'
      AND soh.OrderDate < '01/01/2012') AS OrdersIn2000
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2012'
      AND soh.OrderDate < '01/01/2013') AS OrdersIn2001
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2013'
      AND soh.OrderDate < '01/01/2014') AS OrdersIn2002;
GO

See possible answers