mysql> SELECT img.id, img.ubicacion, img.formato, DATEDIFF(NOW(), img.fecha_publicacion) AS diferencia FROM imagenes img ORDER BY diferencia ASC