当前位置:网站首页>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
边栏推荐
- Bluetooth development (2) -- initialization
- 集合删除元素技巧 removeIf
- Bluetooth development (8) -- avdtp connection process
- Website online customer service system Gofly source code development log - 5 Gin framework integration daemon
- 数据库表结构
- [pyGame games] interesting puzzle game: how many hamsters can you play? (source code attached)
- Njuptn Nanyou Discrete Mathematics_ Experiment 4
- Struggle, programmer -- Chapter 56: hard work with thousands of blows
- After deepin20 menu startup option, the self-test indicates that iwlwwifi is stopped
- 对接请求方式
猜你喜欢

Things about Bluetooth development (10) -- getting to know ble for the first time

【Pygame小游戏】Chrome上的小恐龙竟可以用代码玩儿了?它看起来很好玩儿的样子~
![[pyGame games] I'm not afraid you can't walk the maze series: the ultimate AI walks the maze. After learning, it will take you to open the door to a new world ~ (with game source code)](/img/57/dcf291b044b5e5860a7fdc817076d5.jpg)
[pyGame games] I'm not afraid you can't walk the maze series: the ultimate AI walks the maze. After learning, it will take you to open the door to a new world ~ (with game source code)
![[turtle confessions collection]](/img/97/6f1008386931bcb93655d94121e2c4.png)
[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 ~

Leetcode-713 subarray with product less than k

Several common current transformer sampling circuits

USB IP core FPGA debugging (I)

博文推荐|构建 IoT 应用——FLiP 技术栈简介

Error report of curl import postman
![[opencv practice] in cold winter, there will be a rainbow. Do you love this special effect?](/img/24/40c299b023f5f8d781d11296bcf28a.png)
[opencv practice] in cold winter, there will be a rainbow. Do you love this special effect?
随机推荐
【Pygame小游戏】这款“打地鼠”小游戏要火了(来来来)
When leaving the web page, the website displays 404 Not found- starze V Club
【Opencv实战】这个印章“神器”够牛,节省了时间提高了效率,厉害~(附完整源码)
选择排序
A simple understanding of B tree
[AI card player] for the first time to see such an "exciting" landowner, the key factor for a high winning rate is
Judgment and other issues: how to determine whether the judgment of the procedure is correct?
基于华为云ECS的目标检测与识别的昇腾AI开发体验【华为云至简致远】
csdn每日一练——找出最接近元素并输出下标
ASP. Net programming version C (notes along with learning progress)
【JVM】类加载机制
[pyGame] this classic bomber super game is online. Do you love it? (source code attached)
[pyGame games] in the first month, it broke 100 million to download a masterpiece that is highly integrated with "super casual game features"~
启牛学堂理财可靠吗,安全吗
yum源更新
[pyGame games] tank battle, how many childhood games do you remember?
Njupt South Post collection_ Experiment 1
Lambda 学习记录
The website is harmed by XSS hanging horse
[mathematics] [continuum mechanics] symmetry tensor, strain tensor and stress tensor in fluid mechanics