• I am not getting you.. will you provide some schema of table and sample data and what you

    want (result data).

    which help us for proper answer