I have the following database structure:
And the data stored inside is as follows:
However, I like to select data from this
database in the following format:
How can I use one single
SELECT statement to achieve this? If using one single
SELECT statement cannot, how to achieve this by whatever
sql code? Can someone give me the implementation?