34,587
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
SELECT *
FROM table1 AS A
WHERE NOT EXISTS(SELECT * FROM table1 WHERE tsid=A.tsid AND dodate>A.todate) order by dodate desc
SELECT *
FROM table1 AS A
WHERE NOT EXISTS(SELECT * FROM table1 WHERE tsid=A.tsid AND dodate>A.todate);
select distinct tsid from table1 order by dodate desc
select tsid from table1 group by tsid order by dodate desc
select distinct tsid from table1 order by dodate desc
select distinct tsid from table1 order by dodate desc