Select distinct ih.customer_id,patient_name,
sum(id.order_qty) qty
from invoice_header ih,
invoice_detail id,
item_profile ip,
valid_products@plab.world vp
where id.invoice_number = ih.invoice_number
and id.item_id = vp.product_code
and id.item_id = ip.item_id
and ip.item_type in ('P')
and customer_id = 'WAD-EX0128'
and ih.invoice_date between '01-JAN-2015' and '31-JAN-2015'
and vp.inv_product_type in ('RBC','LRBC','LPHER','PHER','FFP','FP24','CRYO')
group by ih.customer_id,patient_name
union all
Select distinct ih.customer_id,patient_name,
sum(id.order_qty) qty
from invoice_header ih,
invoice_detail id,
item_profile ip,
valid_products@plab.world vp
where id.invoice_number = ih.invoice_number
and id.item_id = vp.product_code
and id.item_id = ip.item_id
and ip.item_type in ('P')
and customer_id = 'WAD-EX0128'
and ih.invoice_date between '01-FEB-2015' and '28-FEB-2015'
and vp.inv_product_type in ('RBC','LRBC','LPHER','PHER','FFP','FP24','CRYO')
group by ih.customer_id,patient_name
union all
Select distinct ih.customer_id,patient_name,
sum(id.order_qty) qty
from invoice_header ih,
invoice_detail id,
item_profile ip,
valid_products@plab.world vp
where id.invoice_number = ih.invoice_number
and id.item_id = vp.product_code
and id.item_id = ip.item_id
and ip.item_type in ('P')
and customer_id = 'WAD-EX0128'
and ih.invoice_date between '01-MAR-2015' and '31-MAR-2015'
and vp.inv_product_type in ('RBC','LRBC','LPHER','PHER','FFP','FP24','CRYO')
group by ih.customer_id,patient_name
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE