Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
If I have date and email as the columns in a table, how can apply rank within the same emails by date, similar to rank() over partition by email in SQL.
Thanks.
Could you please explain in other words. Maybe with an sample data set together with an expected output from that set.
Either as a table in a post or as an excel or qvf-file
Hello Vegar,
app_email | applied_at | Approved | date(clicked_out_at) | Contract_signed_on | Contract_signed_on | utm_uid | product | API | Rank |
x@live.co.uk | 26-07-2021 | True | 26-07-2021 | TRUE | 30-07-2021 | 6464564 | a | True | |
x@live.co.uk | 28-07-2021 | True | 28-07-2021 | TRUE | 30-07-2021 | 8484847 | b | True | |
x@live.co.uk | 30-07-2021 | True | 30-07-2021 | TRUE | 31-07-2021 | 8447464 | b | True | |
x@live.co.uk | 11-08-2021 | True | 11-08-2021 | TRUE | 31-07-2021 | 9484847 | a | True | 1 |
y@gmail.com | 26-07-2021 | True | 26-07-2021 | TRUE | 30-07-2021 | 6464564 | a | True | |
y@gmail.com | 28-07-2021 | True | 28-07-2021 | TRUE | 30-07-2021 | 8484847 | b | True | |
y@gmail.com | 30-07-2021 | True | 30-07-2021 | TRUE | 31-07-2021 | 8447464 | b | True | |
y@gmail.com | 11-08-2021 | True | 11-08-2021 | TRUE | 31-07-2021 | 9484847 | a | True | 1 |
Have applicant data in this format, as there are duplicate emails in this dataset, I would like to rank within the same email using the applied_at date (similar to partition by in sql), such that I assign a rank to the most recent app within the same email, in the example above the most recent app we received from x@live.co.uk is on 11-08-2021 so would like to assign it a rank, such that later on I can only select those with a rank.
Thanks!