T-SQL Query help- find range in a table
<p>I have a table as below. I need the result in the range of name as mentioned below. Kindly provide T-SQL query</p>

<pre><code>ID  Name
101 AA1
102 AA1
103 AA1
104 AA2
105 AA2
106 AA3
107 AA1
108 AA1
109 AA2
110 AA2
111 AA2
112 AA4
</code></pre>

<p>Need result as </p>

<pre><code>Name Range
AA1  101-103
AA2  104-105
AA3  106
AA1  107-108
AA2  109-111
AA4  112
</code></pre>