select sbj_id, sum ( bew_mng_mz )
from factory.checks
where
to_char( c_datum, 'yyyy' ) = '2018'
having sum( bew_mng_mz ) between 100 and 500
group by sbj_id;
Output: SBJ_ID SUM(BEW_MNG_MZ) ---------- --------------- 37024 300 36336 140 37305 210 30890 500 38433 403
No comments:
Post a Comment