I execute below query and expecting first set then second set distinctly but order is totally random.
I expected results: john,mark,dave,robert,kirk

```
select *
from (
    select Name
    from (values ('john'),('mark'),('dave')) X(Name)
    union
    select Name
    from (values ('robert'),('mark'),('kirk')) X(Name)
) q

```

This is alternative query which i expected to have ordered(stable) results but i get same results. Union All append second set as i expected but applying Distinct later break ordering. 

```
select Distinct Name
from (
    select Name
    from (values ('john'),('mark'),('dave')) X(Name)
    union all
    select Name
    from (values ('robert'),('mark'),('kirk')) X(Name)
) q

```

What is solution for having ordered and distinct set ?