欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

mysql 分組總計(jì)查詢,mysql先排序后分組

mysql 分組總計(jì)查詢,mysql先排序后分組?

用分組函數(shù)來做,假如你的表名是table_nameselect A.*from table_name A,(select product,max(date) max_date from table_name group by product) Bwhere A.product=B.product and A.date=B.max_date;