I'm new to database concepts. So, i need some help in solving a particular problem.
Say i have a table named emp whose data are as below:  

```
id | dept | doj
100 | FS | 02-04-13
100 | HST | 02-04-14
100 | ETA | 02-04-15

```

What i want to display is:  

```
id | from | to | doj
100 | FS | HST | 02-04-14
100 | HST | ETA | 02-04-15

```

Any help would be appreciated. Thank you.
The database i'm using is MS-SQL server 13v.