SELECT
count( * )
FROM
`tp_2018-01`
WHERE
SUBSTRING( scan_date, 1, 10 ) BETWEEN MIN( CAST( SUBSTRING( scan_date, 1, 10 ) AS DATE ) )
AND MAX( CAST( SUBSTRING( scan_date, 1, 10 ) AS DATE ) )
AND nip = '1060001'
并返回此类错误
> 1111 - Invalid use of group function
> Time: 0,018s
这是我的表结构
_____________________________
| id | scan_date | sn | nip |
-----------------------------
我只是坚持这个问题。