1
我想在SQL Server中對相同的yAxisTitle進行分組,下圖顯示了我的數據。如何使用SQL Server對行值進行分組?
預期結果:
查詢我所用:
select
q.questionId, q.questionName,
p.perspectiveTitle, x.xAxisTitle, y.yAxisTitle, c.value
from
coaching_questionPerspectiveMap as c
inner join
Coaching_question as q on c.questionId = q.questionId
inner join
Coaching_perspective as p on c.perspectiveId = p.perspectiveId
inner join
coaching_xAxisData x on c.xAxisDataId = x.xAxisDataId
inner join
coaching_yAxisData y on c.yAxisDataId = y.yAxisDataId
where
q.questionId = 14
and p.perspectiveId = 1
order by
c.sort
請提供任何解決辦法嗎?
感謝,
發表您的問題一點點清晰.. –
在您預期的結果你沒有對這些數據進行分組,您剛剛通過yAxisTitle訂購了它。這是你想要的嗎? – Simon
是的,我無法對行進行分組。 –