MYSQL

매일 출석체크 하는 사람 조회 MYSQL

728x90
반응형

SELECT uid

  FROM attend

 WHERE dt BETWEEN '2017-11-01' AND '2017-11-10'

 GROUP BY uid

 HAVING COUNT(*) = DATEDIFF('2017-11-10', '2017-11-01') + 1

;

 

출처 : www.gurubee.net/article/78513

728x90
반응형