联系官方销售客服
1835022288
028-61286886
mysql 查询重复数据保留数值最大的一条、、、用原生的研究出来了 敢问各位大佬 是否有更效率方便简洁的写法 总感觉这个写法太臃肿了
{module module=kaoshi return=c} {php $query=urlencode("select * from `dr_1_kaoshi_form_son` A where `cid` = ".$c.id." AND `status` = 1 AND not exists(select * from `dr_1_kaoshi_form_son` where cid = ".$c.id." and author=A.author and my_score>A.my_score) ORDER BY `my_score` DESC");} {$c.title} {sql sql='$query'} <div>账号:{$t.author} 分数:{$t.my_score}</div> {/sql} <hr> {/module}