--Number of medical releases released in the last 30 days
SELECT substr (a.feed_publish_time,6, 5) as ' Date ', COUNT (*) as ' medical say number ' from Xm_feed a WHERE
Date_sub (Curdate (), INTERVAL) <= a.feed_publish_time GROUP by substr (a.feed_publish_time,1, 10);
--the number of medical comments released in the last 30 days
SELECT substr (a.comm_create_time,6, 5) as ' Date ', COUNT (*) as ' medical commented number ' from Xm_feed_comment a WHERE date_sub (Curdate (), Interv AL <= a.comm_create_time GROUP by substr (a.comm_create_time,1, 10);
--The number of medical diffusion releases in the last 30 days
SELECT substr (a.repost_create_time,6, 5) as ' Date ', COUNT (*) as ' medical commented number ' from Xm_feed_repost a WHERE date_sub (Curdate (), INTER VAL <= a.repost_create_time GROUP by substr (a.repost_create_time,1, 10);
--The last 30 days of medical talk about the number of likes released
SELECT substr (a.digg_create_time,6, 5) as ' Date ', COUNT (*) as ' medical commented number ' from Xm_feed_digg a WHERE date_sub (Curdate (), INTERVAL <= a.digg_create_time GROUP by substr (a.digg_create_time,1, 10);
--Yesterday's data
SELECT Count (*) as Num from Xm_user a WHERE a.user_audit_status = ' audited ' and Date_sub (Current_date (), Interval 1 day) = SUBSTR (a.user_create_time,1, 10);
SELECT Count (*) as Num from Xm_user a WHERE date_sub (current_date (), Interval 1 day) = substr (a.user_create_time,1, 10);
SELECT Count (*) as Num from Xm_feed a WHERE date_sub (current_date (), Interval 1 day) = substr (a.feed_publish_time,1, 10);
SELECT Count (*) as Num from Xm_feed_comment a WHERE date_sub (current_date (), Interval 1 day) = substr (a.comm_create_time,1, 10);
SELECT Count (*) as Num from Xm_feed_repost a WHERE date_sub (current_date (), Interval 1 day) = substr (a.repost_create_time,1 , 10);
SELECT Count (*) as Num from Xm_feed_digg a WHERE date_sub (current_date (), Interval 1 day) = substr (a.digg_create_time,1, 10 );
MySQL Stats summary-last 30 days, yesterday's stats