我有以下SQL查询:
select count(*) from (
select *, count(*)
from po_item
where sku_code ="SKU_TEST_4" and allocated = false and wip = false
group by warehouse
) as t
我能够使用Criteria API和JPQL
编写以下内部查询select *, count(*)
from po_item
where sku_code ="SKU_TEST_4" and allocated = false and wip = false
group by warehouse
但无法将其与外部部分一起编写。如何使用JPQL或Criteria API执行此操作?