2.2 DISTINCT
Find products that are sold 5 pieces at one time, and their prices and units:
SQL
SELECT DISTINCT ProductID,Price,Unit
FROM Orders
WHERE Quantity>=5
SPL
A | |
---|---|
1 | =file(“Orders.ctx”).open().cursor@x(ProductID,Price,Unit;Quantity>=5) |
2 | =A1.groups(ProductID,Price,Unit) |
A2 groups function is equivalent to DISTINCT when it doesn’t have an aggregate expression.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL