Update SQL output with new phasing and some other updates.