请各位大侠帮帮忙。谢谢

selectc.con_id,c.area_code,c.con_code,c.on_line,c.create_date,(selectcount(1)fromvalv... select c.con_id,c.area_code,c.con_code,c.on_line,c.create_date,
(select
count(1) from valve_regular v where v.con_id=c.con_id) as vsum,
(select
count(1) from valve_regular v where v.meter_state=0 and v.con_id=c.con_id) as
verronum,
(select count(1) from valve_regular v where v.meter_state=1 and
v.con_id=c.con_id) as vsucessnum,
(select count(1) from valve_regular v where
v.meter_state=2 and v.con_id=c.con_id) as vnothingnum,
(select count(1) from
calorimeter_regular r where r.con_id=c.con_id) as csum,
(select count(1) from
calorimeter_regular r where r.meter_state=0 and r.con_id=c.con_id) as
cerronum,
(select count(1) from calorimeter_regular r where r.meter_state=1
and r.con_id=c.con_id) as csucessnum,
(select count(1) from
calorimeter_regular r where r.meter_state=2 and r.con_id=c.con_id) as
cnothingnum from concentrator c 请问这个sql语句能有更好的简便方法解决吗??? 急 。。请大侠们帮忙看下 谢谢!
展开
 我来答
漫涯谷
2014-04-16
知道答主
回答量:35
采纳率:0%
帮助的人:9.1万
展开全部
使用左右链接就ok了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式