Forum Discussion
table expression
Hi, I expected Customer and Purchase Date header for the following output. why I got Sales_Customer and Sales_Purchase Date?
7 Replies
- kooroshPost Partisan
Hi, Since the sales table has "customer" and "purchase date" columns, so the Lastpurchase variable that is the outcome of GroupBY should have common join columns to get correct output from NATURALLEFTJOIN as you see in the following!
- v-kelly-msftCommunity Support
Hi koorosh ,
Could you pls provide some dummy data with expected output for test?
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- kooroshPost Partisan
Hi Kelly, I tried to break the final code in “Days since Last Purchase” into many steps. I expected in “Purchase step2” step, I got a table with “customer”, “Purchase date” and “Last purchase” columns. But as you see they are “sales_customer”, “sale_purchse date” and “Last purchase” instead.
https://drive.google.com/file/d/1Ily0fzWIu4MZTbfDQa-DfCrqyrc6m_fC/view?usp=sharing
Best regards
Koorosh