当前位置:网站首页>SQL语句问题,不知道是否正确,求指导
SQL语句问题,不知道是否正确,求指导
2022-07-20 08:38:00 【CSDN问答】
SQL语句问题
目的查询次日留存,语句中join表on后,为什么会连AND datediff的这个语句,这点不是很理解,这个语句的连接是否是正确的?请了解能够指导下,谢谢。
select u.dayno 日期,count(distinct s.uid) '次日留存'
from userinfo u
left join userinfo s
on u.uid = s.uid
AND
DATEDIFF(s.dayno,u.dayno)=1
where u.app_name='相机'
and
s.app_name='相机'
group by u.dayno;
边栏推荐
- linux服务器PostgreSQL数据库自动备份
- redis 'module' 不是内部或外部命令?
- R 语言 rmd输出有中文 ,怎么去除中文
- Aruba learning notes 02 Web UI -- Introduction to dashborder panel
- Morningstar Ventures采访Moonbeam创始人Derek
- Google play product details, exam content
- PHP login and exit login logic
- PHP registration user requirements
- The best method of converting string to date in R language
- bgp简介
猜你喜欢
随机推荐
使用uniCloud云函数在小程序中解码微信运动步数
Vs2017 modify the default include directory and Library Directory
Rapid drawing of multivariate regression analysis forest map with R language
bgp简介
R语言一页多图
php 登录与退出登录逻辑
Spark高效数据分析04、RRD创建
TP5.1 分页(带参数传递)
让你的ggplot2支持markdown语法
R language world values survey assignment
Two common ways of communication between VLANs
BBC follow-up 49 years: seven years of life for the poor and the rich
R语言求微分
数字孪生虚拟现实的发展趋势
ASP. Net core using redis
长沙大屏开发
R language homework III
(Chapter 2 - stacks and queues) section 3 sequential storage structure of queues
「接口测试入门课」打卡学习 day09:微服务接口:怎么用Mock解决混乱的调用关系
链式存储结构的线性表