Last answered:

01 Sept 2023

Posted on:

31 Aug 2023

0

I don't think 'min()' was used correctly in the video

Steps taken:

1. self join purchase table, name p1 and p2

2. group by p1.purchase_id

3. use min() to find the earliest purchase record for each purchase record


In the video, we group by p1.purchase_id, thus we should min(p2.purchase_date) instead of min(p1.purchase_date) in order to find the correct 'first_purchase_date'


1 answers ( 0 marked as helpful)
Instructor
Posted on:

01 Sept 2023

0

Hi Wenhao, 

thanks for reaching out! I'll look at the code and get back to you as soon as I can. In the meantime, don't hesitate to reach out if you have any other comments or quesions about the course. 


Best, 

365 Eli

Submit an answer