Just to add some nuance: SunOS up to version 4 was strictly BSD-based with vendor enhancement. "SunOS 5" became Solaris 2, and conversely, SunOS 4 was retroactively dubbed "Solaris 1".
Solaris 2 and up were derived from System V release 4, which had actually merged the best of System V with both Xenix and BSD, so rather than being purely AT&T Unix, SVR4 was promised as the best of all worlds, with some ability to pick and choose which variety was in play, based somewhat on provision of both types of utilities in separate directories, and appropriate libraries and APIs.
SVR4, IMHO, was the best and most stable Unix, and the right choice for vendors to adopt in those days.
funnily enough, solaris 2 was also identifying as sunos 5 depending on what tool you used to query.
sun's pivot from bsd to at&t was a very nice and clean change (I was the one who ended up upgrading our sunos servers to solaris when the time came in the 90's), sequent's switch was a nightmare.
I still miss my e4500, though, but not the noise or electric bill.