Say I have multiple columns and three different rows. I want to pull the all the ID with the latest date 20220205 (for Ann) and 20220208 (for Lima) to get the correct package code. How do I code it out in the where statement?
ID | Name | pkg_date | package |
---|---|---|---|
11 | Ann | 20220205 | R |
11 | Ann | 20220101 | A |
11 | Ann | 20211101 | U |
22 | Lima | 20210708 | B |
22 | Lima | 20220208 | A |