Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Select
  2. ( select name from items where id = ol.itemid ) as itemname,
  3. ol.quantity as quantity_ordered,
  4. ( select sum(quantity) from deliverylines dl where dl.olid = ol.id ) as quantity_delivered
  5. from orderlines ol
  6. where orderid = <id>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement