get planing from order data in ms sql

RAVI 1,076 Reputation points
2023-12-27T10:18:08.1+00:00

This is my customer order table

User's image

Our Production Capacity Is Per Day 80 QUANITY Each Machine Capacity Is 20 Quantity

This is my machine breakdown table

User's image

If machine failure it should plan for next available machine

I want output like this

User's image

need sql query

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,611 Reputation points
    2023-12-28T07:03:09.7333333+00:00

    This is my customer order table

    No, that's an image, I can't query images and I don't have your database.

    Please post table design as DDL, some sample data as DML statement and the expected result.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.