Fetch inventory sum of a item which has an alternative item id
I have to write a query where i want to check the active elements for an item ( that item can have an alternative item and the alternative can have another alternative item and so on) .
Active will be decided based on the stocks available for the item/alternative(physicalinvent+ordered+arrived) from the inventsum table where inventsum.itemid = inventtable.itemid/inventtable.altitem
Please help me with the query as iam literally struggling with this
Sql server recursive cte with window functions
I’m trying to do some log analysis and I’m trying to get a breakdown by the various levels of a domain name… i.e. for a domain name with 4 codons (a.b.c.com for example), I want to be able to roll them up by .com, c.com, b.c.com and a.b.c.com.