Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT SUM(total_value)
- FROM ins_inspections insp
- , ins_inspection_items item
- , ins_products prod
- , ins_insurance_companies comp
- WHERE insp.id = ITEM.INS_INSPECTION_ID
- AND item.ins_product_id = prod.id
- AND comp.id = INSP.INS_INSURANCE_COMPANY_ID
- AND INSP.DELIVER_DATE BETWEEN '01/01/2016' AND '30/01/2016'
- AND insp.situation IN ('3')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement