The green's function method in quantum statistics