问题描述
我的问题是如何获取最后5个orderno ..在我的表1中orderno包含多个销售详细信息。
例如..
我一天有5个订单..
在1st orderno,我有5个销售
在第二个订单,我有2个销售
在第3顺序,我有1个销售
在第4顺序,我啊7个销售
在5顺序,我有3个销售
现在,如果我将获取最后5个订单,那么表格将显示(5 + 2 + 1 + 7 + 3)= 18没有记录..
plz帮我写sql以上例子的查询..
先谢谢
My problem is how to fetch last 5 orderno..In my table 1 orderno contain multiple sales details.
for example..
I have 5 order in a day..
in 1st orderno, i have 5 sale
in 2nd order, i have 2 sale
in 3rd order, i have 1 sale
in 4th order, i ahve 7 sale
in 5th order, i have 3 sale
now, if i will fetch last 5 order then table will show (5+2+1+7+3)=18 no of record..
plz help me to write sql the query of the above example..
Thanks in Advance
这篇关于我有桌子'销售'Orderno独特产生的地方..单个Orderno Conatins多个销售..现在我想要获取最后5 Orderno的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!