【发布时间】:2015-08-08 01:12:37
【问题描述】:
我正在尝试为子查询编写 JPQL 查询。查询如下。
select
fos_name, count(ALLOCATION_BUCKET) as bucket_count
from
(select
*
from
kic.master_mis
where
ALLOCATION_DATE IN (select
max(ALLOCATION_DATE)
from
kic.master_mis
group by BILLED_ID))
where
date(ALLOCATION_DATE) Between 'starting day month -14' AND 'till the date the month completes 30 or 31 days' group by fos_name`
我正在使用 MySQL 原生查询,但现在有一个可变周期。
【问题讨论】: