I have some data in Google Sheets that contains duplicate account numbers with different dates. I want to query the data and to remove the duplicates, and select only those rows with the most recent date.
Sample data is here:
115684 11/21/2019 Blue
115684 11/20/2019 Green
115684 11/19/2019 Yellow
165488 11/17/2019 Red
165488 11/12/2019 Blue
165488 6/19/2019 Green
556689 11/21/2019 Yellow
556690 11/21/2019 Red
556691 6/19/2019 Blue
so the result should look like this:
115684 11/21/2019 Blue
165488 11/17/2019 Red
556689 11/21/2019 Yellow
556690 11/21/2019 Red
556691 6/19/2019 Blue
I tried this, but it didn't work:
=QUERY(A:C, "SELECT A, B, C WHERE MAX(B)")