Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select
- ( select name from items where id = ol.itemid ) as itemname,
- ol.quantity as quantity_ordered,
- ( select sum(quantity) from deliverylines dl where dl.olid = ol.id ) as quantity_delivered
- from orderlines ol
- where orderid = <id>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement