I hava the sql as below:
select a.dept, a.name
from students a
group by dept, name
order by dept, name
结果:
dept name
-----+---------
CS | Aarthi
CS | Hansan
EE | S.F
EE | Nikke2
我想总结一下每名优秀学生的金:
dept name count
-----+-----------+------
CS | Aarthi | 2
CS | Hansan | 2
EE | S.F | 2
EE | Nikke2 | 2
Math | Joel | 1
我如何写这 s?