joined:May 2, 2004
I am trying to rerieve how many people have scanned our qr code today, but some people have scanned it twice and I am trying to remove scans that came from the same ip.
id,qr_code_id, date_read, ip
SELECT qr_code_id,COUNT(qr_code_id) AS qrcount, DATE(qr_date_read) bydate
WHERE DATE(qr_date_read) = CURDATE()
GROUP BY qr_code_id
Just to clarify, if a user from the same ip has scanned two different qr_code_id's then they should be counted, but if the user has scanned one qr_code_id twice then its a duplicate.
Can anyone help?