mysql - How to I find multiple logs in the same time interval? -


i have table 2 columns of importance, customer id# , timestamp. whenever customer orders something, 5 rows created customer id # , timestamp of when went through.

if there more 5 rows, means our system hasn't processed order correctly , there problem, , asked through log find customer ids of people received more 5, how many times received incorrect amount , number received each time (when not 5)

i want show me, whenever same customer id (in column "id") has more 5 rows same timestamp (column "stamp") tell me 1. person's customer id 2. how many times irregularity has happened customer id, , 3. how many rows in each irregularity (was 6 or 7... or more? etc.) (if #2 3 times, #3 array { 7, 8, 6 })

i don't know if possible... @ appreciated. thanks!

this should of way there:

select `customerid`, `timestamp`, count(1)     orderitems group     `customerid`, `timestamp` having     count(1) > 5 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -