SELECT COUNT(1) FROM ZFS_OP.OP_EFS_PAYMENT WHERE GROUP_ID='35f1594c-6139-4b8e-9d19-a6d42d579e0c' AND PAYMENT_STATUS=30 AND ARCHIVE_DATE AND ENABLED_FLAG=0 AND VALIDITY_FLAG=0 AND ON_OFF_LINE=0b补充oraclesql,写三个oraclesql,ARCHIVE_DATE条件是本年,本月,本日
时间: 2023-11-24 11:05:19 浏览: 132
zfs_linux.pdf.tar.gz_ZFS_linux file system
补充 Oracle SQL:
1. 本年:
```
SELECT COUNT(1) FROM ZFS_OP.OP_EFS_PAYMENT
WHERE GROUP_ID='35f1594c-6139-4b8e-9d19-a6d42d579e0c'
AND PAYMENT_STATUS=30
AND ARCHIVE_DATE >= TRUNC(SYSDATE,'YEAR')
AND ARCHIVE_DATE < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12)
AND ENABLED_FLAG=0
AND VALIDITY_FLAG=0
AND ON_OFF_LINE=0;
```
2. 本月:
```
SELECT COUNT(1) FROM ZFS_OP.OP_EFS_PAYMENT
WHERE GROUP_ID='35f1594c-6139-4b8e-9d19-a6d42d579e0c'
AND PAYMENT_STATUS=30
AND ARCHIVE_DATE >= TRUNC(SYSDATE,'MONTH')
AND ARCHIVE_DATE < ADD_MONTHS(TRUNC(SYSDATE,'MONTH'),1)
AND ENABLED_FLAG=0
AND VALIDITY_FLAG=0
AND ON_OFF_LINE=0;
```
3. 本日:
```
SELECT COUNT(1) FROM ZFS_OP.OP_EFS_PAYMENT
WHERE GROUP_ID='35f1594c-6139-4b8e-9d19-a6d42d579e0c'
AND PAYMENT_STATUS=30
AND ARCHIVE_DATE >= TRUNC(SYSDATE)
AND ARCHIVE_DATE < TRUNC(SYSDATE)+1
AND ENABLED_FLAG=0
AND VALIDITY_FLAG=0
AND ON_OFF_LINE=0;
```
注意:以上 SQL 仅供参考,具体需要根据实际情况进行调整。
阅读全文