Sample For 8729296

0

Please login or register to vote for this query.

(click on this box to dismiss)

Enter Query Description

Bicycles

Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- Sample For 8729296
-- Enter Query Description

With SampleData AS 
(
SELECT 'Team1' as Team , '[email protected]' as email, 'A' as Groups
UNION SELECT 'Team1' as Team , '[email protected]' as email, 'B' as Groups
UNION SELECT 'Team1' as Team , '[email protected]' as email, 'C' as Groups
UNION SELECT 'Team2' as Team , '[email protected]' as email, 'A' as Groups
UNION SELECT 'Team2' as Team , '[email protected]' as email, 'B' as Groups
UNION SELECT 'Team2' as Team , '[email protected]' as email, 'C' as Groups
)
SELECT Team, A, B,C FROM 
(SELECT * FROM SampleData) source
PIVOT
(MAX(email) FOR Groups IN ([A], [B], [C]) )as pvt

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results