select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group
select*from(selecttop10*from(selectsum(number)asamount,ISBNfromtb_Order_detailgroupby...
select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc
帮忙分析解释一下这个语句 特别是后边的这个是什么意思啊 o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc 展开
帮忙分析解释一下这个语句 特别是后边的这个是什么意思啊 o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc 展开
2个回答
展开全部
INNER JOIN 运算
组合两个表中的记录,只要在公共字段之中有相符的值。
o 是(select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) 作为o表,就是组合o表和 tb_bookinfo 表(b表)两个表的记录,只取出这两个表里面相符的值,条件就是o.ISBN=b.ISBN order by o.amount desc
组合两个表中的记录,只要在公共字段之中有相符的值。
o 是(select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) 作为o表,就是组合o表和 tb_bookinfo 表(b表)两个表的记录,只取出这两个表里面相符的值,条件就是o.ISBN=b.ISBN order by o.amount desc
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询