The command and position structure is interesting if not damn confusing to follow. on Trek.
Obrien was the chief of operations yet his main job was engineering, so he was the chief engineer.
Data was the chief of operations, and the chief science officer and the 2nd officer.
Dax was the chief science officer, like Data, yet Data wore the yellow uniform. Dax did almost everything Data did, like report on systems, sensory scans etc, and she might have been the 2nd officer too.
But she was kept strictly as a science officer.
From what I've seen, the command division basically stands around on the bridge and gives out orders.
They have the X.O status and seem to have automatic authority conferred on them.
In FC, when Worf comes aboard the Enterprise, Riker outranks Worf, but with the red uniform and the 2 and a half pips now, Worf seems to stand almost on a equal footing, if you look at the way they interact.
Data was the 2nd officer, but Shelby was the one around giving orders. Notices how she 'takes' Data with her on an away team mission on her own authority.
Or gives orders to Data on the bridge with Picard and Riker present.