How popular is Nintendo in japan?

Nintendo is one of the largest companies in japan but i don't think its better than sony probably the 2nd largest in japan( maybe im not certain but i think so)