Question: Let's say I play a necromancer and have raised some Skeletons or Zombies using Animate Dead and some Gouls, Ghasts, Wights or Mummies using Create Undead.

When I use a bonus action to command them can I command all the undead I have with single bonus action even though they were created with different spells?

Answer: 
No
==

The spells lists the option as follows (**emphasis** mine)

> 
> On each of your turns, you can use a bonus action to mentally command any creature you made with **this spell** 
> 
> 
> 

Since you can only command creatures created by the specific spell, any other creatures are not commanded, even though the spells are related.
The spells have the following text:

> 
> As a Bonus Action on each of your turns, you can mentally Command any creature you animated with this spell if the creature is within 120 feet of you (if you control multiple creatures, you can Command any or all of them at the same time, issuing the same Command to each one)
> 
> 
> On each of your turns, you can use a Bonus Action to mentally Command any creature you made with this spell if the creature is within 60 feet of you (if you control multiple creatures, you can Command any or all of them at the same time, issuing the same Command to each one)
> 
> 
> 

Each permit you to spend a Bonus Action to Command any creature you [created/animated] with **this spell** if **condition**. They then let you control multiple creatures with the same command.

It is ambiguous if this Bonus Action to mentally Command is the same kind of bonus action or a different one; they are both Bonus Actions to Command creatures. It is reasonable for them to be different kinds of Bonus Actions (qualified by spell), or the same Bonus Action (a mental Command Bonus Action), with possibly different effects.

If we go with "the same kind of bonus action, just different effects" as the plain-English reading would indicate, then, it is ambiguous if the text in () applies across spells. If the text in () said "if you control multiple creatures animated with this spell" it would be clear, but the text in () doesn't explicitly restrict the "multiple creatures" to be ones animated/created with this spell.

Any answer either way should be treated as suspect, barring a designer weighing in.

It is even ambiguous if multiple casts of *this spell* count for the second clause or not (ie, is it *this spell* as in this instance of this spell, or *this spell* as in all castings of this spell? Or is the bonus action granted by the first cast of *this spell* a different bonus action than the one granted by the second cast of *this spell*? Ambiguous.)

D&D 5e is written in English prose, and lots of things are ambiguous in English prose. You must work out what is reasonable with your DM.

It would be reasonable for your DM to read the rules as stating that one command would work only on undead created by one cast of one of those spells, or it working on all undead created by multiple castings of one of those spells, or on all undead created by any number of castings of both spells. The text is simply not clear.

And there are game fictions reasons for any of those 3 to be supported.