select mp.attribute7 Fab_Code,count(*) from
apps.oe_order_lines_all oeol,
apps.mtl_parameters mp
where to_date(oeol.schedule_ship_date) between to_date('08-09-2024 00:00:00', 'DD-MM-YYYY HH24:MI:SS') and to_date('08-09-2024 23:59:59', 'DD-MM-YYYY HH24:MI:SS')
and mp.organization_id=oeol.ship_from_org_id
group by mp.attribute7
order by mp.attribute7;