Skip to main content

Posts

Showing posts from November 5, 2021

SQL Where Complex Query : #100daysofsql Day 3

 SELECT --43659, 43662   SalesOrderId,   SalesOrderNumber,   SubTotal,   OrderDate,   (     SELECT SUM(OrderQty)     FROM Sales.SalesOrderDetail     WHERE SalesOrderID not in (43659, 43661, 43662, 43668)   ) AS TotalSales FROM   Sales.SalesOrderHeader WHERE   SalesOrderID not in (43659, 43661, 43662, 43668); The above query explained in this below video,