我有一个类似于下面的 oracle 表,它存储人们的姓氏和年龄。如果姓氏相同,则属于同一家庭。
LastName FirstName Age
===========================
1 miller charls 20
2 miller john 30
3 anderson peter 45
4 Bates andy 50
5 anderson gary 60
6 williams mark 15
我需要编写一个 oracle sql 查询来选择每个家庭中最年轻的人。输出 shd 选择第 1、3、4 和 6 行
我该怎么做呢 ?