如题,如何在页面上显示这个记录集的最后一条记录呢?语句如下:
SELECT isnull(c.title,'总计') xiangmu, sum(isnull(p.score,0)) blzf, sum(isnull(q.score,0)) bldf from classlist c left join (select n.class,sum(score) as score from news n,answer a where n.id=a.stid and not exists(select 1 from answer where stid=a.stid and score>a.score) group by n.class) p on c.id=p.class left join (select class,sum(score) as score
FROM grade WHERE username='varuser' group by class) q on c.id=q.class
WHERE c.depth<>0 group by c.title with rollup
我想显示的是总计对应的blzf和bldf.
SELECT isnull(c.title,'总计') xiangmu, sum(isnull(p.score,0)) blzf, sum(isnull(q.score,0)) bldf from classlist c left join (select n.class,sum(score) as score from news n,answer a where n.id=a.stid and not exists(select 1 from answer where stid=a.stid and score>a.score) group by n.class) p on c.id=p.class left join (select class,sum(score) as score
FROM grade WHERE username='varuser' group by class) q on c.id=q.class
WHERE c.depth<>0 group by c.title with rollup
我想显示的是总计对应的blzf和bldf.
FROM grade WHERE username='varuser' group by class) q on c.id=q.class
WHERE c.depth<>0 group by c.title with rollup) p order by '排序字段?' desc