晕晕乎乎的,表格 CD 栏目 (作者,专辑名,公司,曲目数量,年份),要求选出专辑数量大于 1 的作者,并且不能用 having 语句。不知道怎么查询到结果,应该大概就是子查询 group by 吧?
1
BROWNURSIDAE 2015-11-24 22:02:51 +08:00
应该要有 count
|
2
ggjjl1 2015-11-24 22:39:34 +08:00 1
select
author, ab_num from ( select author, count(album) as ab_num from table_cd group by author ) t where ab_num > 1 |
4
elvba 2015-11-25 00:41:42 +08:00 1
|