sql Cancelaciones sin pago pendiente

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Cancelaciones sin pago pendiente相关的知识,希望对你有一定的参考价值。


SELECT app1.car_id, app1.appointment_id FROM pending_payment as pp1 join appointment as app1 on app1.appointment_id = pp1.appointment_id join slave_card_charge as scc on pp1.appointment_id = scc.appointment_id WHERE pp1.status = 1 AND app1.status in (4,5) AND scc.created_date >= '2019-06-03' and scc.created_date<'2019-06-10 00:00:00' AND scc.captured = 'true'


SELECT app.car_id, app.appointment_id FROM appointment as app WHERE app.created_dt >= '2019-06-03' and app.created_dt<'2019-06-10 00:00:00' AND app.amount > 0 AND (app.status in (4,5) AND NOT EXISTS( SELECT pp.appointment_id FROM pending_payment as pp WHERE pp.appointment_id = app.appointment_id))

以上是关于sql Cancelaciones sin pago pendiente的主要内容,如果未能解决你的问题,请参考以下文章

在 SQL Server 2012 上使用带有空间索引的 STDistance 比使用 COS、SIN 和 ACOS 计算要慢,并给出椭圆形的结果

sql BIT / IAM-1605 - Adecuaciónparamostrar asignaturas que no se hayan tomado sin thoughtfulra

sql报错(索引丢失参数)

加载简单Pag Nokogiri

腾讯自主研发动画组件PAG开源

web端腾讯PAG初体验