This is a logic based assignment.
There are two tables : Buy and Sell having details of product bought and sold respectively.
Logic is required to match the quantities in Buy table with those in Sell table based on qty and earliest sold dates.(First in First Out)
A third table is to be generated which is called Matched after matching the buy and sell quantities as per the earliest sold dates.
The format of these tables is shown in the Excel file and the logic for matching is
described in the word file [url removed, login to view]
2 Sets of logic are required:
1. When all these 3 tables exist in normal Excel or Csv file and the output also is in Excel or Csv file
2. When all these 3 tables exist as Postgres tables.
This is required to be done in C# or [url removed, login to view] preferably, but any other smart solution could also be considered.
Please read the Word Document and check the table format carefully to understand the logic clearly first,
if in doubt please ask questions before bidding.