0

Iam having query below

   SELECT cookie_name,SUBTIME( CURTIME() , min( time ) ) AS spent ,date, sum( cookie_view ) AS views FROM cookie_table GROUP BY cookie_name, date HAVING sum( cookie_view ) =1

For this query i got data like this

         cookie_name     spent               date   views   
         5gm7aXUvkbhh   00:25:44.000000     25/11/16    1
         ZR7929L32Bq    00:28:30.000000     25/11/16    1

From this data i want to get day wise report i.e; how many names and how many views spent with in 0-1min,1-2min and >2min like

        views  time  cookie_name  date
         -      0-1     -          -
         -      1-2     -          -
         2      >2      2      25/11/16

For this report i want to sore this data to duplicate table? how ?give any suggestion

0 Answers0