摘要:
开窗函数overselect orderid, custid, val,SUM(val) over() as totalvalue,SUM(val) over(partition by custid) as custtotalvaluefrom Sales.OrderValuesselect orderid, custid, val,100. * val / SUM(val) over() as pctall,100. * val / SUM(val) over(partition by custid) as pctcustfrom Sales.OrderValuesover 子句也支持四种排 阅读全文
posted @ 2013-11-04 21:49
逝者如斯(乎)
阅读(221)
评论(0)
推荐(0)
浙公网安备 33010602011771号