A query to find the best matched group
I have got a really complext query to write.
I have got an ITEM table that contains items with different price and I have to find the items from the table that makes up an order of particular amount.
Now when order amount is 2 it should return item 1 & 2.
when order amount is 1.15, it should return item 3
when order amount is 1.20, it should return item 4
when order amount is 2.15, it should return item 2 & 3
when order amount is 3.35, it should return item 2, 3 & 4.
Order amount can be anything. Any help would be highly appreciated.
Tags for this Thread