Hi,
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.
Columns are
id,qr_code_id, date_read, ip
I have
SELECT qr_code_id,COUNT(qr_code_id) AS qrcount, DATE(qr_date_read) bydate
FROM qr_promotions_log
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?
Thanks