ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

sql语句做分页查询时并统计符合查询条件的总行数

2022-01-28 10:00:48  阅读:30  来源: 互联网

标签:语句 eventec LoadingPeople sum list 查询 sql LoadingBuildingId select


select
id,
page.sum
from BizPostOrder list
join
(
select
count(*) sum
from BizPostOrder
where
MerchantCode= "eventec" and LoadingBuildingId= "9006_a60e492942af4e1c" and LoadingPeople = "张三"
) as page
where
list.MerchantCode= "eventec" and list.LoadingBuildingId= "9006_a60e492942af4e1c" and list.LoadingPeople = "张三" group by list.Id

标签:语句,eventec,LoadingPeople,sum,list,查询,sql,LoadingBuildingId,select
来源: https://www.cnblogs.com/lishanstudy/p/15851944.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有