how to construct sql query............?

hello i am newbie in sql server so any one teach me how to merge this two query in one. actually this two work fine individually.

1)select distinct(a.qty) as 'processed', b.item_ref from stock a

join stock_chk b on a.item_code=b.item_code and a.loc_id='050' and b.loc_id='050'

2)select sum(qty) as unprocessed ,item_ref from stock_chk group by item_ref

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.