下面表格通过 SQL 语句,从数据库中提取结果,生成表格及图形

select cu.display_name as "用户名(全名)", count(case when c.version=1 then c.contentid end) as "总创建页面数量", count(case when c.version >1 then c.contentid   end) as "总编辑页面次数" ,max(c.lastmoddate) as "最后一次编辑时间" from  CONTENT  c join user_mapping um on c.lastmodifier=um.user_key  join cwd_user cu on um.lower_username=cu.lower_user_name join cwd_membership cm on cm.child_user_id=cu.id join cwd_group cg on cg.id=cm.parent_id where cg.group_name like 'unlimax%' and c.contenttype='PAGE'  and c.content_status<>'draft' group by cu.display_name order by 总创建页面数量 desc ,总编辑页面次数 desc;