Given this output to one query:
ID | Question | Answer
1 | 1 | 2
1 | 2 | 5
1 | 3 | 5
2 | 1 | 2
2 | 2 | 2
3 | 4 | 7
Is there any way in sql to have something like:
ID | Question | Answer
1
| 1 | 2
| 2 | 5
| 3 | 5
2
| 1 | 2
| 2 | 2
3
| 4 | 7
The objective is to not repeat ID over and over, but i have nothing to group by for as i want to show all results individually.
I have tried working around GROUP BY but without much results so far.
I’m using SQL Server.
You need to
Example: