Suppose you have the following data:
+-------+--------+------------+
| Name | Rating | Date |
+-------+--------+------------+
| Alice | 4.5 | 01/01/2022 |
| Alice | 4 | 14/12/2021 |
| Alice | 4 | 16/05/2021 |
| Mary | 5 | 05/01/2022 |
| Mary | 4 | 31/01/2022 |
| Bob | 3.5 | 03/02/2022 |
+-------+--------+------------+
What would be the best way to group by name and return the row with the most recent date in Snowflake (ANSI SQL)? Expected output:
+-------+--------+------------+
| Name | Rating | Date |
+-------+--------+------------+
| Alice | 4.5 | 01/01/2022 |
| Mary | 4 | 31/01/2022 |
| Bob | 3.5 | 03/02/2022 |
+-------+--------+------------+