select *
from (SELECT a.*,
(select count(distinct b.fee_name)
from biz_patent_fee_notice b
where b.main_id = a.id) notices,
(select count(distinct b.fee_name)
from biz_patent_fee_notice b
where b.main_id = a.id
and to_date(b.notice_date)-trunc(sysdate) between 1 and 7) dueNotices,
(select count(distinct b.fee_name)
from biz_patent_fee_notice b
where b.main_id = a.id
and sysdate > b.notice_date) seniorNotices
FROM biz_patent_fee_main a
where 1 = 1
order by ID asc)
where rownum <= 10
oracle一周内日期查询
最新推荐文章于 2024-07-18 21:24:26 发布
1127

被折叠的 条评论
为什么被折叠?



