I have a table.
+--------+--------+--------+
|stud_no |exam_dt |score |
+--------+--------+--------+
|1 |01-01-19|95 |
|1 |01-02-19|92 |
|1 |01-04-19|91 |
|1 |01-05-19|96 |
|1 |01-03-19|90 |
|2 |01-06-19|81 |
|2 |01-04-19|83 |
|2 |01-03-19|90 |
|2 |01-07-19|96 |
|2 |01-02-19|94 |
+--------+--------+--------+
and I wanted it to be like
+--------+--------+--------+--------+--------+--------+--------+--------+
|stud_no |01-01-19|01-02-19|01-03-19|01-04-19|01-05-19|01-06-19|01-07-19|
+--------+--------+--------+--------+--------+--------+--------+--------+
|1 |95 |92 |90 |91 |96 | | |
|2 | |94 |90 |83 | |81 |96 |
+--------+--------+--------+--------+--------+--------+--------+--------+
and like this if I put a date range in my where clause ex. 01-01-19 to 01-05-19
+--------+--------+--------+--------+--------+--------+
|stud_no |01-01-19|01-02-19|01-03-19|01-04-19|01-05-19|
+--------+--------+--------+--------+--------+--------+
|1 |95 |92 |90 |91 |96 |
|2 | |94 |90 |83 | |
+--------+--------+--------+--------+--------+--------+