• Tracey,

    I think you will need to post DDL and data for us to help you.Otherwise the short answer is "Because they don't match so are not distinct"

    Could you build a CTE that includes a RANK() OVER(Partition by Rider, Date ORDER BY TripID )

    You can then join the CTE to itself  

    SELECT
        CTE1.*
        ,CTE2.*
    FROM
       CTE CTE1
    LEFT JOIN
        CTE CTE2 ON CTE2.Rider = CTE1.Rider
        AND CTE2.Date = CTE1.Date
        AND CTE2.Rank > CTE1.Rank
        AND CTE2.Pickup = CTE1.Dropoff
        AND CTE2.Dropoff = CTE1.Pickup
    ORDER BY
       CTE1.Rider
        ,CTE1.Date
        ,CTE1.Rank

    This will give you all of the trips and the return trip if it exists

    You will get multiple joins if the rider can do the same round trip more than once in a day but this should at least indicate where the round trips are and why they are not displaying correctly in your distinct