SQL查询平均价格语句

SQL数据库查询语句

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [BoID]
      ,[BoTitle]
      ,[BoAuthor]
      ,[BoPublisher]
      ,[BoPublicationDate]
      ,[BoPrice]
      ,[BoStatus]
  FROM [CollegeCard_DB].[dbo].[Books]

img

select DISTINCT BoPublisher,count(BoPublisher) 
over(partition by BoPublisher )
from Books

img

怎样查询出图书馆藏书最多的出版社

SELECT TOP 1 BoPublisher,COUNT(*) FROM Books
GROUP BY BoPublisher
ORDER BY COUNT(*) desc

还有个问题就是

img


有这个表,怎样查找没有借阅过的书