How to transpose mysql table data using mysql query : <p>I would like to transpose attendance sql table as below </p>

<p><a href="https://i.stack.imgur.com/2FqbI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2FqbI.png" alt="Below Mysql table data"></a></p>

<p>To the following </p>

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

<p>Please help me here</p>

<p>Thanks
Sara</p>
