明天的明天 永远的永远 未知的一切 我与你一起承担 ??

是非成败转头空 青山依旧在 几度夕阳红 。。。
  博客园  :: 首页  :: 管理

sql,求和小于一定值的数据行

Posted on 2019-01-29 14:15  且行且思  阅读(1349)  评论(0编辑  收藏  举报
select 

count(id),sum(Price)
from [T_AddPrice] as a
where (select sum(Price) from [T_AddPrice] as b where a.id<=b.id)<1000
--order by id