SELECT * FROM ( SELECT SUM(secondLuckNumber) - SUM(firstLuckNumber) + count(firstLuckNumber),#每天字段secondLuckNumber的和减每天字段firstLuckNumber加每天字段firstLuckNumber的数量 DATE_FORMAT(time, ‘%Y%m%d‘) days FROM records GROUP BY days DESC ) AS tmp LIMIT 30#最新30天
时间: 2024-10-12 19:16:47