当前位置:网站首页>SQL查询,子查询作为结果字段
SQL查询,子查询作为结果字段
2022-06-10 22:52:00 【號先生】
SQL查询,子查询作为结果字段,
SELECT DISTINCT
sp.comcode,
sp.projectname,
sp.projecttime,
sp.busnature,
sp.bustype,
sl.concode,
sl.conname,
sl.contype,
sl.conpartya,
sl.contotal,
sl.conrisedate,
sl.constopdate,
sl.contotalperiod,
(
SELECT
SUM(chargemoney)
FROM
sab_b_conpay sc
WHERE
sc.concode = sl.concode
GROUP BY
sc.concode
) AS chargemoney000,
(
SELECT
SUM(confirmamount)
FROM
sab_b_conpay sc
WHERE
sc.concode = sl.concode
GROUP BY
sc.concode
) AS confirmamount000,
(
SELECT
SUM(noconfirmamount)
FROM
sab_b_conpay sc
WHERE
sc.concode = sl.concode
GROUP BY
sc.concode
) AS noconfirmamount000
FROM
sab_b_ledger sl
LEFT JOIN sab_b_project sp ON sl.projectcode = sp.projectcode
边栏推荐
- 集合删除元素技巧 removeIf
- 【Pygame小游戏】激荡大脑思维,一起来玩转奇思妙想“24点”叭~(超赞滴)
- LabVIEW error "memory full - Application stopped on node"
- Is the financial management of qiniu school reliable and safe
- IGBT and third generation semiconductor SiC double pulse test scheme
- Leetcode-713 subarray with product less than k
- Select sort
- Wireshake introduction learning notes
- WinDriver compilation summary
- 【Pygame小游戏】这款“打地鼠”小游戏要火了(来来来)
猜你喜欢

【Pygame小游戏】别找了,休闲游戏专题来了丨泡泡龙小程序——休闲游戏研发推荐

Easyrecovery15 simple and convenient data recovery tool

Leetcode-15 sum of three numbers
![[pyGame] this](/img/7c/adc13c0c87ca31c8581d68e6f21363.jpg)
[pyGame] this "groundhog" game is going to be popular (come on, come on)

LabVIEW uses the visa read function to read USB interrupt data

【AcWing】4. Multiple knapsack problem I

SystemVerilog (x) - user defined type

yum源更新

LabVIEW determines the position of the control in the display coordinate system
![[fireworks in the sky] it's beautiful to light up the night sky with gorgeous fireworks. A programmer brought a fireworks show to pay New Year's greetings to everyone~](/img/3b/2fcd5ff2ea08c4c63428899babd522.png)
[fireworks in the sky] it's beautiful to light up the night sky with gorgeous fireworks. A programmer brought a fireworks show to pay New Year's greetings to everyone~
随机推荐
Exception 0xc00000005 code occurred when LabVIEW called DLL
csdn每日一练——找出最接近元素并输出下标
The same customized right-click menu beautification on this site - Xingze V Club
IGBT and third generation semiconductor SiC double pulse test scheme
[turtle confessions collection] "the moon at the bottom of the sea is the moon in the sky, and the person in front of us is the sweetheart." Be happy for the rest of your life, and be safe for ever ~
【Pygame小游戏】趣味益智游戏 :打地鼠,看一下能打多少只呢?(附源码)
Is the financial management of qiniu school reliable and safe
[mathematics] [continuum mechanics] symmetry tensor, strain tensor and stress tensor in fluid mechanics
Method of converting file to multipartfile
第一章 总论-会计基础
From the perspective of Confucius Temple IP crossover, we can see how the six walnuts become "butterflies" for the second time
选择排序
【Pygame小游戏】这款经典的炸弹人超能游戏上线,你爱了嘛?(附源码)
About optimizing API interface response speed
【Pygame小游戏】《坦克大战》,那些童年的游戏你还记得几个呢?
Typecho blog site wide deployment of Tencent cloud CDN tutorial - Xingze V Club
博文推荐|构建 IoT 应用——FLiP 技术栈简介
[daily] robots Txt allow all search engines to include
Select sort
[opencv practice] in cold winter, there will be a rainbow. Do you love this special effect?