• Lokesh Vij (2/4/2013)


    This is what I have come up with based on your requirement. Not sure for what you need a group by when total amount in there in Transaction table.

    Exactly ; that is why , the DDL and Sample data 😀

    was suddenly got busy ; realised again, that Data error would always come , when you least expect it 😀

    Pawan , Please post the exact requirement , because what I understood is that , you are expecting the product cost sum at the end,and that is why you were looking for Group by ; but, you stated in your question , you already have the sum amount, so , it shouldn't require group by, an inner join should be suffice.

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm: