Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can we write equivalent logic in SQL for apply map used in qlik sense script?
Hi, I'm far from being an expert in SQL, maybe there is a better way but you can use subselect to simulate mapping tables:
SELECT Ord.SalesOrderID, Ord.OrderDate,
(SELECT MAX(OrdDet.UnitPrice)
FROM Sales.SalesOrderDetail AS OrdDet
WHERE Ord.SalesOrderID = OrdDet.SalesOrderID) AS MaxUnitPrice
FROM Sales.SalesOrderHeader AS Ord;