8.6 Judge equality of sets when order is considered
Here below is a monthly sales ranking table for the first half of the year:
Find out the month whose products ranking by sales is the same with the products ranking by total sales in the first half of the year:
A | |
---|---|
1 | =E(‘A1:D19’) |
2 | =A1.groups(ProductName;sum(Sales):Sales).sort(Sales:-1).(ProductName) |
3 | return A1.group@o(Month).select(~.(ProductName)==A2).id(Month) |
A1: Convert the passed-in data to a two-dimensional table sequence.
A2: Calculate the products ranking by total sales in the first half of the year.
A3: Find out the month whose products ranking by sales is the same with the products ranking by total sales in the first half of the year through the operation for judgement of the equality of sets.
Result: May
https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1655342206166
https://c.scudata.com/article/1655428690528
SPL Official Website 👉 https://www.esproc.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.esproc.com
Discord 👉 https://discord.gg/2bkGwqTj
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/