当前位置:网站首页>Association condition of SQL left connection
Association condition of SQL left connection
2022-06-21 12:34:00 【CSDN Q & A】
Hive SQL
existing surface A,B,C,D, Among them user_id As the association condition of each table If you want to pass ABCD The table forms funnel data (A The table shows the maximum funnel D Table shows the minimum funnel )
select count(distinct a.user_id),count(distinct b.user_id),count(distinct c.user_id),count(distinct d.user_id)
from
(select user_id
from a
) as a
left join
(
select user_id
from b
) as b
on a.user_id=b.user_id
left join
(
select user_id
from c
) as c
on b.user_id=c.user_id
left join
(
select user_id
from d
) as d
on c.user_id=d.user_id
By table c For example Please write in the following related conditions b.user_id=c.user_id or a.user_id=c.user_id Will there be any difference in data or operating efficiency
边栏推荐
猜你喜欢

Educoder web exercises - structural elements

Educoder web exercises -- text level semantic elements

Introduction to CPU, MPU, MCU, SOC and MCM

五大(七大)原则-系统学习三

Educoder 表格标签—表格高级样式的设置

3D Slicer将分割结果保存

常用的17个运维监控系统

External attention tensorflow (under update)

matplotlib 画图 Tips

12 tips for achieving it agility in the digital age
随机推荐
2022年CIO需要关注的九个趋势和优先事项
Redis-bitmap 位图
为什么世界上只有13个根域名服务器
在数字时代实现IT敏捷性的12个技巧
最新远程部署运维工具汇总
Educoder 表格标签—表格高级样式的设置
创建型模式 - 单例模式
dicom格式转成nii.gz文件
Schéma technique du système de surveillance de l'environnement de la salle de distribution
uniapp中常用到的方法(部分) - 时间戳问题及富文本解析图片问题
[100 unity practical skills] | make the skills or equipment follow the character and rotate continuously in the game
Educoder Web练习题---分组元素
The wechat authorization login window will pop up automatically
RPC(远程过程调用协议)
嵌入struct和嵌入interface
Nine trends and priorities that CIOs need to focus on in 2022
6. 函数
Three structures of program - system learning I
8 种最坑的SQL错误用法
Version number naming convention