当前位置:网站首页>SQL query, subquery as result field
SQL query, subquery as result field
2022-06-11 00:12:00 【Mr. No】
SQL Inquire about , Subquery as result field ,
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
边栏推荐
- 【AcWing】4. Multiple knapsack problem I
- 静态方法static学习
- phpstudy的安装
- 【Pygame小游戏】这款“打地鼠”小游戏要火了(来来来)
- Website online customer service system Gofly source code development log - 5 Gin framework integration daemon
- [pyGame collection] memory killing - "Childhood Games", how many shots did you get? (attach five source codes for self access)
- vtk. VTP download in JS
- Difference between oscilloscope and spectrum analyzer
- 2022年高考量化卷|请各位量化考生答题
- VTK例子--三个相交的平面
猜你喜欢

Leetcode-15 sum of three numbers

Opencv实战之图像的基本操作:这效果出来惊艳了众人(附代码解析)

【JVM】类加载机制

Compared with the "South-to-North Water Transfer", what will the "east to west" of the fire bring to cloud computing?

安全生产月,黄埔开展燃气安全进商铺宣传活动

The website is harmed by XSS hanging horse

Njupt Nanyou Discrete Mathematics_ Experiment 3

It is said that the verification code is a barrier in the crawler. I can break through it with only five lines of code.

【AcWing】4. Multiple knapsack problem I

Bluetooth development (11) -- ble interacts happily
随机推荐
[daily] robots Txt allow all search engines to include
[opencv practice] this seal "artifact" is awesome, saving time and improving efficiency. It is powerful ~ (complete source code attached)
A simple understanding of B tree
归并排序
MP框架基本操作(自用)
The same customized right-click menu beautification on this site - Xingze V Club
Njupt Nanyou Discrete Mathematics_ Experiment 1
Difference between oscilloscope and spectrum analyzer
From the perspective of Confucius Temple IP crossover, we can see how the six walnuts become "butterflies" for the second time
SystemVerilog (x) - user defined type
Bluetooth development (3) -- look at the air bag
【Turtle表白合集】“海底月是天上月,眼前人是心上人。”余生多喜乐,长平安~(附3款源码)
SQL查询,子查询作为结果字段
Exemple VTK - - trois plans qui se croisent
Compared with the "South-to-North Water Transfer", what will the "east to west" of the fire bring to cloud computing?
From the perspective of Confucius Temple IP crossover, we can see how the six walnuts become "butterflies" for the second time
[appearance detection artifact] come on, please show me your unique skill (is this appearance worthy of the audience?)
Several common current transformer sampling circuits
Bluetooth development (9) -- A2DP protocol in combination with code
【Pygame小游戏】不怕你走不过系列:极致AI走迷宫,学习完带你打开新世界大门~(附游戏源码)