Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT acqli."id" AS "Lineitem ID",
- acqlid."barcode" AS "Barcode"
- FROM acq.lineitem_detail AS acqlid
- INNER JOIN asset.copy AS copy ON (acqlid."eg_copy_id" = copy."id")
- INNER JOIN acq.lineitem AS acqli ON (acqlid."lineitem" = acqli."id")
- INNER JOIN acq.cancel_reason AS acqcr ON (acqlid."cancel_reason" = acqcr."id")
- WHERE acqcr."id" IN ('2001','2002','2003','1285','2005','1002','2008','2010','2036','2012','1','2034','2013','2018','2015','2016','1007','1010','2019','2020','2021','2022','2023','2035','2','2026','2028','2033','2032')
- AND copy."deleted" = '0'
- GROUP BY 1, 2
- ORDER BY acqli."id" ASC, acqlid."barcode" ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement