In which episode does Troi study to become full commander?

As far as the Klingon civil war episode, I’ll agree, there was no way Picard, a Captain, should have been given command of a fleet, but one can be given command of a ship without actually having the rank of Captain.

What I want to know, since this thread has been good and hijacked, how the heck is the Enterprise a “Flagship” without a Flag Officer?

Yeah, but in the US Navy, at least, Lieutenant Commanders are routinely addressed as “Commander”, the same way you call a Lieutenant Colonel “Colonel”.

And I wouldn’t expect an admiral to command what’s effectively an out of the way supply and refueling station. Admittedly, after the discovery of the wormhole, the station became more important.