Do you have a question?
Your sub-query doesn't know about columns created in the outer query, so you need to replicate the logic from the outer query in your sub-query.
I don't know your requirement, but I would guess you wnat to have a GROUP BY in your outer query, or what is your desired en result?
Do you want the most sold sku for every state, or just the overall highest order count and the state/sku combination associated with it?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.