3
I have the following table:
Whereas today is 02/01/2019, while doing the pivot table below:
SELECT hora,
CASE WHEN data = CURDATE()
THEN tarefa
ELSE NULL
END AS campo_1
FROM tabela
WHERE data BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 2 DAY)
GROUP BY hora, data
ORDER BY hora
I get the following output:
But I’d like to get:
All help is welcome, thank you
See if this can help you.
– Sam
Excellent Sam, from the idea I put together my code and it worked. Thanks!!!
– Mauro Piro