I have the below query
SELECT TOP 10
pkRowId AS [Row Guid],
fkItemId AS [Item Guid],
SortOrder AS [SortOrder],
IsMain,
Updated,
REPLACE(Url, 'i.ebayimg.com', 'ecx-images.amazon.com') AS [Url],
ROW_NUMBER() OVER (PARTITION BY fkItemId ORDER BY SortOrder) AS [Row Number]
FROM
[download].[item_image]
which displays data in the below format:
which I would like to be displayed in the following format:
How can I pivot my source so that Url1
displays the Url where IsMain is true
?