首页 > 其他分享 >app成交人数

app成交人数

时间:2023-12-27 17:27:10浏览次数:52  
标签:2022 app 售出 a1 日期 b1 成交 人数 select

drop table appcjrs
select a1.日期2,day(a1.日期2) as 日,convert(varchar(7),a1.日期2,111) as 年月,a1.kacnapp售出人数,a1.kacnapp累计售出人数,a2.kltapp售出人数,a2.kltapp累计售出人数,
isnull(a1.kacnapp售出人数,0)+isnull(a2.kltapp售出人数,0) as 两站售出人数,
isnull(a1.kacnapp累计售出人数,0)+isnull(a2.kltapp累计售出人数,0) as 两站累计售出人数
into appcjrs
from (
select *,sum(kacnapp售出人数) over(partition by convert(varchar(7),日期2,111) order by 日期2) as kacnapp累计售出人数 from (
select distinct 日期2,count(*) as kacnapp售出人数 from (
select distinct 日期2,会员id from kacn售出
where 日期2 between '2022-07-01' and '2022-09-30'
and 设备1 in ('ios','android')
and 会员id not in
(
select distinct 会员id
from kacn售出 as b1
where convert(varchar(7),b1.日期2,111)=convert(varchar(7),kacn售出.日期2,111)
and day(kacn售出.日期2)>day(b1.日期2)
and b1.日期2 between '2022-07-01' and '2022-09-30'
and b1.设备1 in ('ios','android')
)
) as a1
group by 日期2
) as a2
--order by 日期2
) as a1
left join
(
select *,sum(kltapp售出人数) over(partition by convert(varchar(7),日期2,111) order by 日期2) as kltapp累计售出人数 from (
select distinct 日期2,count(*) as kltapp售出人数 from (
select distinct 日期2,会员id from klt售出
where 日期2 between '2022-07-01' and '2022-09-30'
and 设备1 in ('ios','android')
and 会员id not in
(
select distinct 会员id
from klt售出 as b1
where convert(varchar(7),b1.日期2,111)=convert(varchar(7),klt售出.日期2,111)
and day(klt售出.日期2)>day(b1.日期2)
and b1.日期2 between '2022-07-01' and '2022-09-30'
and b1.设备1 in ('ios','android')
)
) as a1
group by 日期2
) as a2
--order by 日期2
) as a2
on a1.日期2=a2.日期2
order by a1.日期2

 


select *,sum(kacnapp售出人数) over(partition by convert(varchar(7),日期2,111) order by 日期2) as kacnapp累计售出人数 from (
select distinct 日期2,count(*) as kacnapp售出人数 from (
select distinct 日期2,会员id from kacn售出
where 日期2 between '2022-07-01' and '2022-09-30'
and 设备1 in ('ios','android')
and 会员id not in
(
select distinct 会员id
from kacn售出 as b1
where convert(varchar(7),b1.日期2,111)=convert(varchar(7),kacn售出.日期2,111)
and day(kacn售出.日期2)>day(b1.日期2)
and b1.日期2 between '2022-07-01' and '2022-09-30'
and b1.设备1 in ('ios','android')
)
) as a1
group by 日期2
) as a2

标签:2022,app,售出,a1,日期,b1,成交,人数,select
From: https://www.cnblogs.com/veryhuasuan/p/17930971.html

相关文章

  • springboot 中,ApplicationRunner、InitializingBean、@PostConstruct 执行顺序
    划水。。。ApplicationRunner、InitializingBean、@PostConstruct执行顺序InitializingBean是Spring提供的一个接口,它只有一个方法afterPropertiesSet(),该方法会在容器初始化完成后被调用。ApplicationRunner是SpringBoot提供的一个接口,它有一个方法run(),该方法会在......
  • 苹果app多种发布方式
    苹果app的发布方式主要分为:  appstore:对外开放的,只要有appleId账户即可搜索下载;  TestFlight:对外发布的测试版本,可以通过appleId邀请指定的账户进行测试,或者通过兑换券进行下载;  分发平台:第三方分发或者自己分发(不对外开放的app)1、appstore苹果商店app,开发完成,提交给苹......
  • 完美解决SqlServer2012启动报错(cannot find one or more components.Please reinstall
    原因:默认安装在C:\ProgramFiles(x86)\MicrosoftVisualStudio10.0文件夹,以支持sqlserver2012.(我之前不小心把这个文件夹删除了)。解决方案:下载了visualstudio2010Isolatedshell完美解决问题,下载后安装就能正常运行SqlServer2012了,其他SqlServer版本请下载visualstudio......
  • uniapp之uni.showModal 弹出多次导致重叠问题
    uniapp之uni.showModal弹出多次导致重叠问题 场景:端口权限过期后提示权限过期。但是同时调用多个接口导致多次报错弹窗。代码:if(code&&code==401){letexists=uni.getStorageSync('token_expired')||falseif(!exists){......
  • Uniapp的android版本的证书制作
    一、查看Java安装路径java-XshowSettings:properties-version二,生成证书指令Enterkeystorepassword://输入证书文件密码,输入完成回车Re-enternewpassword://再次输入证书文件密码,输入完成回车Whatisyourfirstandlastname?[Unknown]:qhweb//输入名字和姓氏,输......
  • MPJLambdaWrapper
    https://mybatisplusjoin.com/pages/quickstart/js.html MPJLambdaWrapper<ProProjectNodeIntentionEntity>wrapper=newMPJLambdaWrapper<ProProjectNodeIntentionEntity>(); wrapper.selectAll(ProProjectNodeIntentionEntity.class); wrapper.select(......
  • Python+Appium自动化测试-元素定位工具
    三种定位工具:UiAutomatorViewerAndroidSDK自带工具location:AndroidSDK安装目录/tools也可以去github下载standalone版本注意:截屏时,当前模拟器不能被其他程序占用,比如在截屏时Weditor也连接了终端AppiumDesktopInspectorAppiumServer自带工具下载地址:https://github......
  • nested exception is org.apache.ibatis.type.TypeException: Could not set paramete
    org.mybatis.spring.MyBatisSystemException:nestedexceptionisorg.apache.ibatis.type.TypeException:Couldnotsetparametersformapping:ParameterMapping{property='name',mode=IN,javaType=classjava.lang.String,jdbcType=null,numericScale=nu......
  • springboot项目Mapper注入失败:@org.springframework.beans.factory.annotation.Autowi
    同事发给我一个项目,说启动时,报mapper无法注入,让我帮忙排查一下问题记录一下我自己遇到这个问题的排查顺序首先先排除以下问题:1.mapper类是否加入到ioc容器中(有没有使用@Mapper标签),如果报错是service层,那就看看是不是没有添加server标签2.检查项目是否扫描mapper类所在......
  • Python+Appium自动化测试环境搭建
    安装JDK并配置环境变量JAVA_HOMEPath验证命令:返回版本号说明配置成功java-version安装AndroidSdk并配置环境变量AndroidSDKTool下载地址:https://www.androiddevtools.cn详细完整版安装步骤:https://blog.csdn.net/qq877728715/article/details/133940938安......