## 看板不统计空单数据;

This commit is contained in:
cabbage 2025-05-24 14:00:35 +08:00
parent 7097c9f069
commit 3bf5403362
1 changed files with 19 additions and 9 deletions

View File

@ -10,7 +10,8 @@
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0) a
and cm.category = 0
and cm.customer_type != 1) a
left join (
select count(1) member_today
from cu_member cm
@ -18,14 +19,18 @@
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd')) b on 1 = 1
to_char(sysdate, 'yyyy-mm-dd')
and cm.customer_type != 1
) b on 1 = 1
left join (select count(1) member_yesterday
from cu_member cm
where cm.del_flag = 0
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd')) c
to_char(sysdate - 1, 'yyyy-mm-dd')
and cm.customer_type != 1
) c
on 1 = 1
left join (select count(1) member_month
from cu_member cm
@ -33,7 +38,9 @@
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm')) d on 1 = 1
to_char(sysdate, 'yyyy-mm')
and cm.customer_type != 1
) d on 1 = 1
</select>
<!-- 会员各等级数据 -->
@ -49,6 +56,7 @@
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd')
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a
right join bd_grade bg
@ -66,6 +74,7 @@
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd')
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a
right join bd_grade bg
@ -82,6 +91,7 @@
and cm.pay_status = 1
and cm.category = 0
and to_char(cm.pay_time, 'yyyy-mm') = to_char(sysdate, 'yyyy-mm')
and cm.customer_type != 1
group by cm.PK_REGISTER_GRADE
order by cm.PK_REGISTER_GRADE) a
right join bd_grade bg