我们假设我提取一些数据集.
即
SELECT A,date FROM table
而且我只想记录最大日期(每个A值).我可以写
SELECT A,col_date FROM TABLENAME t_ext WHERE col_date = (SELECT MAX (col_date) FROM TABLENAME t_in WHERE t_in.A = t_ext.A)