Hi I am having a small issue doing the following. I have a table call analytics. that's all working fine. However when I run the following query
SELECT * FROM analytics
WHERE stamp > date_sub(now(), interval 1 day)
GROUP BY sessionkey;
i get
'20','n2zurgy5wcmiymbcla1hb1fnj0lu5km','2',NULL,'/','2015-06-26 07:14:05'
Which is the last insert for that sessionkey.
Now here is the issue - It's not quite what I want, you see my aim is to get the total of unique sessions for that day and return the total.
I have tried the following:
SELECT * FROM analytics
WHERE stamp > date_sub(now(), interval 1 day)
GROUP BY sessionkey AND date(stamp);
But also without luck, even putting count(*) around the * does not seem to help.
So I believe I need to count around the select statement or something like this, but I am not sure. Could someone please point me in the right direction.