SQL subquery on how to distinguished what has been ordered -
i need list books @ least 4 copies have been ordered bookstore , copies may come multiple orders. not understanding how copies when don't see field close that.
here pic of tables , fields i'm working with.
select t2.title,t3.qty books t2 join ( select t1.isbn,t1.sum(quantity) qty orderlines t1 group t1.isbn) t3 on t2.isbn=t3.isbn t3.qty >= 4
Comments
Post a Comment