Hello guys Im just starting with SQl server, 

Sorce data

```
type    num1    num2    date1         
   A      1       2   01/01/2019    
   b      1           01/02/2019
   b      3           05/02/2017
   a      1       1   03/02/2019    
   a      2       3   15/03/2018    
   b      2           20/12/2018

```

Expected result

```
type    num1    num2    date1         'date2' 
   a      1       2   01/01/2019    20/12/2018
   a      1       1   03/02/2019    01/02/2019
   a      2       3   15/03/2018    05/02/2017

```

this is the best i made until now, and my date2 are all messed up im not getting the correct values , and i still have the problem with dates that the same number can exist in diferent years num1 1 type b exist in 2017 and 2019 

```
select c1.type, c1.num1, c1.num2, c1.date, c2.date as 'date2'
from t1 c1
inner join t1 c2 on c2.num2=c1.num1
order by c1.type

```

Thanks for your help