Write query for this example : <p>I have a table with below data,I want to write a query that give me id and the number of days that have connection. </p>

<p>For example for id 1 give me 2 times (2016-09-20 , 2016-09-22)</p>

<p><a href="https://i.stack.imgur.com/vs3t8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vs3t8.jpg" alt="enter image description here"></a></p>
