我有一个包含以下行的表:
╔══════════╦═══════════╦════════╗
║ PK_VALUE ║ RATING_ID ║ RATING ║
╠══════════╬═══════════╬════════╣
║ 11 ║ 1 ║ 90 ║
║ 11 ║ 2 ║ 80 ║
║ 11 ║ 3 ║ 90 ║
║ 12 ║ 1 ║ 90 ║
║ 12 ║ 2 ║ 80 ║
║ 12 ║ 3 ║ 90 ║
╚══════════╩═══════════╩════════╝
我希望上表为:
╔══════════╦════════════╦════════════╦════════════╗
║ PK_VALUE ║ RATING_ID1 ║ RATING_ID2 ║ RATING_ID3 ║
╠══════════╬════════════╬════════════╬════════════╣
║ 11 ║ 90 ║ 80 ║ 90 ║
║ 12 ║ 90 ║ 80 ║ 90 ║
╚══════════╩════════════╩════════════╩════════════╝
我尝试了一些在 Google 搜索中找到的建议,但它表明我们必须插入表格。我不确定这一点。欢迎任何建议...
I have uploaded the screenshots related to my doubt..
In this image we can see two review ID's for the same pk_value.. But I am receiving only one review ID after including your query..
在上述 How can I get result of both the review ID's???