मुझे लगता है कि "शीर्ष तीन" विशेषज्ञता कॉलम में सबसे अधिक बार आने वाले तीन तत्व हैं, लेकिन इसे बदला जा सकता है यदि यह आपका मतलब नहीं है।
WITH T1 AS (
SELECT TOP(3) Expertise, COUNT(*) AS cnt
FROM Expertise
GROUP BY Expertise
ORDER BY cnt DESC
), T2 AS (
SELECT ROW_NUMBER() OVER (ORDER BY cnt DESC) AS rn, Expertise
FROM T1
)
SELECT (SELECT Expertise FROM T2 WHERE rn = 1) + ',' +
(SELECT Expertise FROM T2 WHERE rn = 2) + ',' +
(SELECT Expertise FROM T2 WHERE rn = 3)
परिणाम:
dfdf,.NEt,fgfg