I have the following result of a query :
NOMECARACTERISTICA NOMEINFORMACAO
Marca Samsung
Marca ASUS
Modelo E32 370E4K-KW3
Modelo X555LF
My idea is to transform it as follows:
Marca Modelo
Samsung E32 370E4K-KW3
ASUS X555LF
I created the query below:
SELECT
CASE WHEN NomeCaracteristica = 'Marca' THEN NomeInformacao END AS Marca,
CASE WHEN NomeCaracteristica = 'Modelo' THEN NomeInformacao END AS Modelo
FROM
(
SELECT
CAR.NomeCaracteristica AS NomeCaracteristica,
INF.NomeInformacao AS NomeInformacao
FROM
caracteristica CAR INNER JOIN informacao INF ON CAR.IdCaracteristica = INF.IdCaracteristica
WHERE
CAR.IdCategoria = 1
ORDER BY
CAR.IdCaracteristica limit 4
) d
But it's bringing me the result:
MARCA Modelo
Samsung NULL
ASUS NULL
NULL E32 370E4K-KW3
NULL X555LF
Can anyone help me get the result I need?