当前位置:网站首页>SQL, CTE, flg case problems
SQL, CTE, flg case problems
2022-06-25 04:12:00 【CSDN Q & A】
Ask everyone one SQL problem ! I want to ask GROUP A-B Part of , Tagged FLG by ‘0’,Group B by ‘1’. It is known that GROUP A yes 520, GROUP B yes 5.FLG by ‘0’ It is 515, But I still get 520. You can have a look at my code Do you ? Maybe something is wrong , thank you !
With PreMatricCTE as
(
SELECT DISTINCT
ID
,CASE
WHEN
(Group B Of where) then 1 else end as CompletedFLG
FROM GROUP A
INNER JOIN GROUP B on A.ID = B.ID
GROUP BY ID
)
SELECT DISTINCT
ID
, MAX (CompletedFLG) as CompletedFLG
FROM PreMatricCTE
WHERE CompletedFLG = '0'
GROUOP BY ID
边栏推荐
- WMS仓储管理系统的使用价值,你知道多少
- Time management understood after working at home | community essay solicitation
- Work assessment of pharmacotherapeutics of Jilin University in March of the 22nd spring -00064
- AI quantitative transaction (I) -- Introduction to quantitative transaction
- 9 necessary soft skills for program ape career development
- Hello CTP (IV) - CTP transaction API
- 冷热酸甜、想成就成?冷酸灵母公司登康口腔欲在深交所主板上市
- Where is the red area of OpenCV?
- 1、项目第二阶段——用户注册和登陆
- 【LeetCode】143. Rearrange linked list
猜你喜欢

Development of trading system (II) -- market data

Hot and cold, sweet and sour, want to achieve success? Dengkang oral, the parent company of lengsuanling, intends to be listed on the main board of Shenzhen Stock Exchange
佐喃社区

cesium 图形标注圆形、正方形、多边形、椭圆等

Hello CTP (II) -- Introduction to CTP

opencv怎么安装?opencv下载安装教程

ZABBIX installation pit avoidance Guide

How many images can opencv open?

代表多样性的彩色 NFT 系列上线 The Sandbox 市场平台

Development of trading system (VII) -- Analysis of trading delay
随机推荐
Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
95% 程序员都在这里摸鱼……
Hello CTP (IV) - CTP transaction API
Hello CTP (II) -- Introduction to CTP
Although the Internet in the traditional sense has long ceased to exist, this does not mean that the Internet has long disappeared
【组队学习】SQL编程语言笔记——Task04
Mstp+vrrp+ospf implements a three-tier architecture
NFT Insider #63:The Sandbox与时代杂志达成合作,YGG成立西班牙subDAO
Hello CTP (V) -- CTP position calculation
Russian Airi Research Institute, etc. | SEMA: prediction of antigen B cell conformation characterization using deep transfer learning
代表多样性的彩色 NFT 系列上线 The Sandbox 市场平台
墨天轮访谈 | IvorySQL王志斌—IvorySQL,一个基于PostgreSQL的兼容Oracle的开源数据库
Trading system development (IV) - trading counter system
How to install opencv? Opencv download installation tutorial
Work assessment of pharmacotherapeutics of Jilin University in March of the 22nd spring -00064
1.初识半音阶口琴
List rendering in wechat applet
Zoran community
Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment
【Kubernetes系列】Helm的安装使用