SELECT username
,COUNT(DISTINCT visit.pcucode,visit.visitno,visit.username) AS COUNT
,COUNT(CONCAT(visitno,pcucode,username)) as 'ครั้ง'
FROM visit
WHERE visitdate BETWEEN '2013-12-01' AND '2013-12-31'
GROUP BY username
ORDER BY count DESC
;