There are times when you need to run the systems internal consistency check for an item to ensure the inventsum (Inventory levels) are correct. The below code will allow you to ensure the inventory levels are correct for an item.
A useful script to see which index the system thinks should be the clustered index, based on query history. This is just providing information as part of a performance review.
To be able to extract ledger information in SQL can be useful for analysis and data extraction. Below is a scrip that will allow you to extract the main account and dimension of the ledger transactions.