select pub_name AS 出版社,type AS 图书类型,count(*)图书种类
FROM titles AS t,publishers AS p
where t.pub_id=p.pub_id AND
(type='business'or type='psychology')
GROUP BY pub_name,type
WITH CUBE
USE pubs
GO
select pub_name AS 出版社,type AS 图书类型,count(*)图书种类
FROM titles AS t,publisther AS p
where t.pub_id=p.pub_id AND
(type='business'or type='psychology')
GROUP BY pub_name,type
WITH CUBE