表名:history 字段:DEPTH、ID等等
统计:select count(*) from (select * FROM history where DEPTH =1 GROUP BY ID) TEMP
最大值:select max(ID) FROM history where DEPTH =1
表名:history 字段:DEPTH、ID等等
统计:select count(*) from (select * FROM history where DEPTH =1 GROUP BY ID) TEMP
最大值:select max(ID) FROM history where DEPTH =1