Qty Adjust based on Last date

  • Dear All Experts,

    I have an table where data is coming as below and i want the output as per the last picture.

    Suppose Item A  have stock 5 Qty and under Item A there are 5 Invoices, so it will check last Invoice Qty and adjust the Invoice Qty based on stock Qty and its should not be more then stock Qty.

    Please provide the sql query for the same.

  • What did you try? This is not a "Please do my work for me" site.  Do it yourself, because you are the one that is going to be supporting it, and answering for it if stuff goes sideways.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply