Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.40 KB | None | 0 0
  1. SELECT SUM(total_value)
  2.       FROM ins_inspections insp
  3.          , ins_inspection_items item
  4.          , ins_products prod
  5.          , ins_insurance_companies comp
  6.      WHERE insp.id = ITEM.INS_INSPECTION_ID
  7.        AND item.ins_product_id = prod.id
  8.        AND comp.id = INSP.INS_INSURANCE_COMPANY_ID
  9.        AND INSP.DELIVER_DATE BETWEEN '01/01/2016' AND '30/01/2016'
  10.        AND insp.situation IN ('3')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement