Here is what I did and it is quick and dirty.
I added up all the numbers used for departments as a total.
Then used the department stat to find a percentage of crew for each department.
Why not use the suggested “Random” race table in the CRB and then equate a %age to each. That should allow for a functional breakdown by Race/Species on a ship for a certain era.
Having read this thread I went through the ships complement for the campaign I have started. For background we are exploring the Gamma Quadrant several years after the Dominion War. So our ship has a focus on Diplomatic and Science discoveries. We also are part of a training program for cadets.
Here is our breakdown of crew:
Red: 23
Green: 10 MACOs are Marines part of Starfleet
Gold: 89
Blue: 49
Grey: 8 cadets
Officers: 91
Enlisted: 80 + 8 cadets
Total: 179
Regarding the original question, it may be worth noting that the Starship Creator game stars with crews equally divided between command, engineering, science, security/tactical, and support, with civilian at 0 (I think; the only video I found that had that portion of the game had a very low resolution). But the sliders for each could be adjusted based on mission profile or how crazy you wanted to get with things. Of course, an equal number of everything is pretty silly, so I’d say that whatever the base profile of the ship was, modified by the mission profile is a fine way of going about it.
Remember, though, that by the 24th century, 12-year-olds are being taught calculus as part of a regular curriculum. And Starfleet recruits the best of the best of the best from a society where that happens. The base-level knowledge that a person has going into Starfleet Academy is already well beyond a modern-day college/bachelor’s degree education. It’s not unreasonable to expect Starfleet officers to be be able to be pretty darn good at multiple things, even if they excel in only one or two.