Q:

MySQL FULL JOIN on same table

I have a table like this:

And I want to get something like:
fecha       siguiendo    seguidores
2016-01-02    430           1430
2016-01-03    450            NULL
2016-01-04    NULL           5000

I have two types of data seguidores and siguiendo. I want a column for each of them.
I have tried to emulate a FULL JOIN on the same table but I didn't get the expected result. Any ideas?

A:

This is called a pivot
SELECT fetcha,
SUM(CASE WHEN Dato='siguiendo' THEN valor END) as siguiendo,
SUM(CASE WHEN Dato='seguidores' THEN valor END) as seguidores
FROM t
GROUP BY fetcha

