• Thanks Chris. This is giving me output of 1st query. Can you please help me how do I get rest 2nd and 3rd query outputs efficiently. Even though I have posted mine way, but I am sure they are not efficient and will work slow if there are thousand of rows in the table.

    Regards

    Girish Sharma