دروپال: استخراج برخی آمار از پایگاه داده دروپال

select avg(count) from (SELECT count(nid) as count , FROM_UNIXTIME(created,'%Y %D %M') as created_date FROM `node` GROUP BY created_date DESC LIMIT 30) a;
select avg(count) from (SELECT count(nid) as count , FROM_UNIXTIME(created,'%Y %D %M') as created_date FROM `comment` GROUP BY created_date DESC LIMIT 30) a;
select avg(count) from (SELECT count(vote_id) as count , FROM_UNIXTIME(`timestamp`,'%Y %D %M') as created_date FROM `votingapi_vote` where tag = 'report' GROUP BY created_date DESC LIMIT 30) a;
select avg(count), totalsum  from (SELECT count(nid) as count, sum(totalcount) as totalsum , FROM_UNIXTIME(timestamp,'%Y %D %M') as created_date FROM `node_counter` GROUP BY created_date DESC LIMIT 30) a;

افزودن نظر جدید