• I forgot to mention that I need to exclude duplicate rows from the result set.

    Thanks.