TP5+原生mysql 语句查询指定日期数据,并取出N条数据

 sql语句的写法示例
SELECT
*
FROM
fa_pass_log p
WHERE
date = '1664467200'
AND 5 > ( SELECT count(*) FROM fa_pass_log p1 WHERE p1.province_id = p.province_id AND p1.user_id > p.user_id )
THE END