Vivek's SQL Notes

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

Subqueries II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Subqueries II

Distributed Monoliths

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Distributed Monoliths

JSON in PostgreSQL

By Shivayan Mukherjee

Comments posted to this topic are about the item JSON in PostgreSQL

Visit the forum

Question of the Day

Subqueries II

What is wrong (if anything) with this code?

SELECT *
 FROM Sales.SalesOrderHeader AS soh 
 WHERE customerid IN (SELECT soh.CustomerID FROM Sales.Customer AS c WHERE soh.CurrencyRateID = 1 ORDER BY c.ModifiedDate)

See possible answers