作者:喵喵妈70929 | 来源:互联网 | 2018-04-25 12:01
SELECTmobileuserid,caozuoleixing,caozuozhi,xiguanzhiFROM`表A`WHERExiguanzhi>2GROUPBYmobileuserid,caozuoleixing,caozuozhi,xiguanzhiORDERBYmobileuserid,caozuoleixing,xiguanzhiDESCLIMIT3000
mysql优化sql
SELECT mobileuserid,caozuoleixing,caozuozhi,xiguanzhi FROM 表A
WHERE xiguanzhi>2
GROUP BY mobileuserid,caozuoleixing,caozuozhi,xiguanzhi
ORDER BY mobileuserid,caozuoleixing,xiguanzhi DESC LIMIT 3000