不错sql

--0表示没有问题 1表示有问题
select * from
(select v0.uuid,v0.name, 
               (case when is_operate=1 then (case when v4.oo_score>=60 then (case when v0.oo_cost>0 then 0 else 1 end) else (case when v0.oo_cost=0 then 0 else 1 end) end) else (case when v0.oo_cost=0 then 1 else 0 end) end) oo,
               (case when is_synthetic=1 then (case when v4.gg_score>=60 then (case when v0.gg_cost>0 then 0 else 1 end) else (case when v0.gg_cost=0 then 0 else 1 end) end) else (case when v0.gg_cost=0 then 1 else 0 end) end) gg,
               (case when is_theory=1 then (case when v4.tt_score>=60 then (case when v0.tt_cost>0 then 0 else 1 end) else (case when v0.tt_cost=0 then 0 else 1 end) end) else (case when v0.tt_cost=0 then 1 else 0 end) end) tt,
               (case when is_english=1 then (case when v4.ee_score>=60 then (case when v0.ee_cost>0 then 0 else 1 end) else (case when v0.ee_cost=0 then 0 else 1 end) end) else (case when v0.ee_cost=0 then 1 else 0 end) end) ee
               --decode(v4.oo_score),
               --decode(v4.gg_score),
               --decode(v4.tt_score),
               --decode(v4.ee_score)

from   
  --本次计划的补考考生
  (select f.uuid,f.isdel,f.examinee_type,f.card_number,f.name,f1.work_name,f1.level_code
          ,f.tt_cost,f.oo_cost,f.gg_cost,f.ee_cost,f1.is_theory,f1.is_operate,f1.is_synthetic,f1.is_english
      from nation_examineedetail f,nation_worktype f1
      where f.plan_uuid = 'cbaa6d10-68a6-4ac2-8932-dd87c00f16fd'
      and f.enroll_level_uuid=f1.uuid
      and f.plan_uuid=f1.plan_uuid
       and f.examinee_type = 2
      and f.status >= 210
      and f.status <> 211) v0,
   --补考考生要关联的上次的scoreinfo信息。
   (select         v3.uuid,
               v3.work_name,
               v3.level_name,
               v3.exam_startdate,
               v3.idcard_number,
               v3.name,
               v3.oo_score,
               v3.gg_score,
               v3.tt_score,
               v3.ee_score 
         from (
select v2.*,rank() over (partition by v2.idcard_number,v2.name order by v2.exam_startdate desc) add_rank
  from (select ttt.work_name,
               ttt.level_code,
               tt.exam_startdate,
               t.card_number,
               t.name
          from nation_examineedetail t,
               nation_planinfo       tt,
               nation_worktype       ttt
         where ttt.uuid = t.enroll_level_uuid
           and ttt.plan_uuid = tt.uuid
           and tt.uuid = t.plan_uuid
           and t.plan_uuid = 'cbaa6d10-68a6-4ac2-8932-dd87c00f16fd'
           and t.examinee_type = 2
           and t.status >= 210
           and t.status <> 211) v,
       (select t3.uuid,
               t2.work_name,
               t2.level_name,
               t3.exam_startdate,
               t2.idcard_number,
               t2.name,
               t2.oo_score,
               t2.gg_score,
               t2.tt_score,
               t2.ee_score
          from nation_scoreinfo t2, nation_planinfo t3,nation_examineedetail t4
         where t2.plan_uuid = t3.uuid and t2.examinee_uuid=t4.uuid and t4.plan_uuid=t3.uuid
           and t2.isdel <> 1) v2
 where v.work_name = v2.work_name
   and v.level_code = v2.level_name
   and v.card_number = v2.idcard_number
   and v.name = v2.name
   and v.exam_startdate <> v2.exam_startdate
) v3 where v3.add_rank=1 
) v4
where v4.work_name=v0.work_name
      and      v4.level_name=v0.level_code
      and         v4.idcard_number=v0.card_number
      and         v4.name=v0.name
      )  vv where vv.oo=0 or vv.gg=0 or vv.tt=0 or vv.ee=0
      ;

 

Rank的基本语法为:

RANK ( ) OVER ( [query_partition_clause] order_by_clause ) 

语法:
rank() over (order by 排序字段 顺序)
rank() over (partition by 分组字段 order by 排序字段 顺序)


 

1.顺序:asc|desc  名次与业务相关:
  示例:求优秀学员,成绩:降序  迟到次数:升序
2.分区字段:根据什么字段进行分区。

问题:分区与分组有什么区别?
•分区只是将原始数据进行名次排列(记录数不变),
•分组是对原始数据进行聚合统计(记录数变少,每组返回一条)。

内容概要:本文详细介绍了名为MoSca的系统,该系统旨在从单目随意拍摄的视频中重建和合成动态场景的新视角。MoSca通过4D Motion Scaffolds(运动支架)将视频数据转化为紧凑平滑编码的Motion Scaffold表示,并将场景几何和外观与变形场解耦,通过高斯融合进行优化。系统还解决了相机焦距和姿态的问题,无需额外的姿态估计工具。文章不仅提供了系统的理论背景,还给出了基于PyTorch的简化实现代码,涵盖MotionScaffold、GaussianFusion、MoScaSystem等核心组件。此外,文中深入探讨了ARAP变形模型、2D先验到3D的提升、动态高斯表示、相机参数估计等关键技术,并提出了完整的训练流程和性能优化技巧。 适用人群:具备一定计算机视觉和深度学习基础的研究人员和工程师,特别是对动态场景重建和新视角合成感兴趣的从业者。 使用场景及目标:①从单目视频中重建动态场景的新视角;②研究和实现基于4D Motion Scaffolds的动态场景表示方法;③探索如何利用预训练视觉模型的先验知识提升3D重建质量;④开发高效的动态场景渲染和优化算法。 其他说明:本文提供了详细的代码实现,包括简化版和深入扩展的技术细节。阅读者可以通过代码实践加深对MoSca系统的理解,并根据具体应用场景调整和扩展各个模块。此外,文中还强调了物理启发的正则化项和多模态先验融合的重要性,帮助实现更合理的变形和更高质量的渲染效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值