hey frnds..
I have two table one is item master and another is stock detail..
i want to join the both table and sum the all qty of item.
means how i can use sum with join of two tables.....
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Anupam SinghRank #643 · 3.7K reputationPosted Jul 1, 2014, 9:51 PM EDT
Try this (not tested)
from stock in stocks
join master in _master on stock.materid equals _master.id
group stock by stock.materid
select new
{
Master_ID = master.id,
Stock_SUM = stocks.Sum(stock.qty)
}
orderby Stock_SUM descending
Mukesh Kumar TiwariRank #1,774 · 844 reputationPosted Jul 8, 2014, 4:01 AM EDT