We present a genealogy for superprocesses with a non-homogeneous quadratic branching mechanism, relying on a weighted version of the superprocess and a Girsanov theorem. We then decompose this genealogy with respect to the last individual alive (William's decomposition). Letting the extinction time tend to infinity, we get the Q-process by looking at the superprocess from the root, and define another process by looking from the top. Examples including the multitype Feller diffusion and the superdiffusion are provided.