有集合homework的数条记录,记录每天作业完成好的学生,优秀的ys,优良的yl,良好lh的学生名。 AAA表示一个学生姓名。
{weeks:1,class:'一班',ys:['AAA','BBB','EEE'],yl:['CCC','FFF'],lh:['HHH','KKK','DDD']}
{weeks:2,class:'一班',ys:['BBB','HHH'],yl:['GGG','FFF'],lh:['CCC','KKK','DDD']}
{weeks:3,class:'一班',ys:['BBB','CCC','KKK'],yl:['GGG','LLL'],lh:['AAA','EEE','DDD']}
现在要统计每个学生在某一时间段内 优秀、优良、良好的次数。hj表示合计,如下查询结果:
{class:'一班',name:'AAA',ys:1,yl:0,lh:1,hj:2}
{class:'一班',name:'BBB',ys:3,yl:0,lh:0,hj:3}
{class:'一班',name:'CCC',ys:1,yl:1,lh:1,hj:3}
{class:'一班',name:'DDD',ys:0,yl:0,lh:3,hj:3}
{class:'一班',name:'EEE',ys:1,yl:0,lh:1,hj:2}
{class:'一班',name:'FFF',ys:0,yl:2,lh:0,hj:2}
{class:'一班',name:'GGG',ys:0,yl:2,lh:0,hj:2}
{class:'一班',name:'HHH',ys:1,yl:0,lh:1,hj:2}
对了,还要能对 合计hj由大到小排序
请高手指导