I have a table which is defined as
Datum, Name, weight
this is populate with
yyyy-mm-dd hh:mm:ss, Bob A, 90
yyyy-mm-dd hh:mm:ss, Bob B, 120
yyyy-mm-dd hh:mm:ss, Bob C, 90
yyyy-mm-dd hh:mm:ss, Bob A, 100
I am looking for the code to present that back as:
Date, Bob A, Bob B, Bob Bob C
2024-01-01 18:00, 90, Null, Null
2024-01-01 19:00, Null, Null, 110
2024-01-01 19:30, Null, 120, Null
Datum | Bob A | Bob B | Bob C |
---|---|---|---|
2024-01-01 18:00 | 90 | ||
2024-01-01 18:00 | 120 | ||
2024-01-01 19:30 | 90 | ||
2024-02-01 08:00 | 80 |
I hope that’s clear!
What I am looking for is to put the column details into a table of columns just containing the name data.
Thanks
My SQL is not that good, I can do this in Excel, but I want it in a web page.
Denis Hadley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.