我是一位新手,对于SQL还不太熟悉,在我的项目中需要进行一些数据库的排序和过滤:
假设我的数据库如下所示:
==========================================
| id | email | name
==========================================
| 1 | 123@test.com | John
| 2 | 234@test.com | Peter
| 3 | 234@test.com | Steward
| 4 | 123@test.com | Ethan
| 5 | 542@test.com | Bob
| 6 | 123@test.com | Patrick
==========================================
我该怎么做才能只返回最后一个拥有相同电子邮件的列?
==========================================
| id | email | name
==========================================
| 3 | 234@test.com | Steward
| 5 | 542@test.com | Bob
| 6 | 123@test.com | Patrick
==========================================
感谢您的提前帮助!