In 3D space, initial coordinates are decided by the given Left-hand and Right-hand coordinates, sometimes called x-up, y-up, z-up conventions which can also be found (for example) in Wiki's EulerAngles
item.
Initial Quaternions are defined corresponding to the intial x-y-z
For example, x-y-z-right hand coordinates, then 0,0,0,1 would be the initial quaternion.
Of course, the order also depends on the setting of program.
For example maybe DirectX and openGL are in different orders of the initial quaternion of the same coordinates.
And also your self programs could in one arbitrary initial order.
However, when one initial order was defined(corresponding to x-y-z), then the other 23 orders could also be well defined.
4!
(*
24
*)
24 is the number of kinds of orders. When I decide which order was used in one 3D game engine which I cannot know the order by specification, I do experiments.
Maybe you could find a Matrix to Quaternion program, and then do rotations in Matrix, then convert the combined final matrix to Quaternions will lead you a good comprehension.