selectcount(*) id,ent_id,name,unit,sum(given_invest) givenInvest,create_by
from cm_excel_check
where unit like'%外协单位%'and ent_id =590599156901351424
查询结果如下:
在java 中代码如下:
@Query(value ="select count(*) id, ent_id, name, unit, sum(given_invest) given_invest"+"create_by from cm_excel_check where unit like %?1% and ent_id =?2",nativeQuery =true)
昨天一个关于jpa数据接收的问题让我十分疑惑,至今未找到答案,在此记录,若有人看到该问题并作出有效解答,不胜感激问题如下:jpa sql(这里为了方便阅读简化了sql)select count(*) id,ent_id,name,unit,sum(given_invest) givenInvest,create_by from cm_excel_check where unit like '%外协单位%' and ent_id =590599156901351424查询结果如下:在jav