There are three broad types of work:
Community labor is the work necessary to maintain the wellbeing of the crew. Medical, hydroponics and a vast array of services.
Environmental labor is the work necessary to keep the colony's systems functioning. Structure, maintenance, air processing, waste treatment and power.
Productive labor is the work necessary to expand the colony either physically or financially. ISRU, mining, manufacturing, exportable research, etc.
Since people are the heart of a colony and the reason for its existence, let's start with community.
The short version:
1000 people need 49 in healthcare, 37 in hydroponics, 168 in food preparation, 29 in cleaning and 10 in other services. That's 293 people or 29.3%.
5000 people need 229 in healthcare, 180 in hydroponics, 846 in food preparation, 142 in cleaning and 50 in other services. That's 1,447 people or 28.9%.
Doctors are essential. Advanced nations tend to have 2-4 doctors per thousand people, sometimes more. The WHO recommends a goal of 2.3 doctors, nurses and midwives per thousand people in low-income nations. The larger the population, the more specialization can be supported among practitioners. A ten-man moonbase would be lucky to have one competent general surgeon and one trained nurse. A city of 10 million might have as many as 30,000 doctors offering a broad variety of specialties; as few as 1 in 3 of those doctors might be general practice. Let's assume the minimum for good care is 1 GP per thousand people; we want two for safety reasons. For specialties we want to focus on the type of service we are likely to need, which is OB/GYN, oncology and possibly orthopedics and/or neurology. Other specialties would be useful of course but the risks of radiation exposure and bone loss due to low G are the primary hazards and OB/GYN services are necessary for a growing population. Most other treatments can be performed by a general surgeon, but neurological problems are the most likely to require specialized training. So, in a community of 1000 people we should have one general practice physician, one general surgeon, an OB/GYN and one other specialist.
Doctors do not exist in a vacuum. For each full-time doctor there are between 3 and 8 full-time support staff depending on the type of practice. Clinics require lab and pathology services. In addition, some underserved areas are able to improve service using advanced practice registered nurses (NP, nurse practitioners) and/or physician's assistants (PA) overseen by a physician. For example, if our community of 1000 were expanded to 5000, we might have one OB/GYN supported by two PA's or NP's and two registered midwives rather than five OB/GYNs and their staff. Practices that have 5-6 staff per full-time doctor tend to be more profitable than those with 3-4 staff. Let's assume six staff members, at least one of whom is a PA or NP and three of whom are nurses. The other two will likely include a records clerk and a receptionist. The overall group of providers will be overseen by a manager with one assistant per 50 people as well as 1-2 pathologists and about 1 lab tech per doctor. Our thousand-member colony would need 35 people (one pathologist, four doctors, four lab techs, four to six PA/NP including at least one nurse anesthetist, 10-12 nurses and 10 administrative). A 5,000 member colony would need 167 people (two pathologists, 20 doctors including at least two anesthesiologists, 20 lab techs, 20-30 PA/NP, 50-60 nurses and 45 administrative).
Facilities to adequately train a general surgeon or a specialist are not likely to exist in space until the population is into the hundreds of thousands. Expect to send candidates to Earth for training or expect to recruit trained staff directly.
Dentists are also essential. Tooth decay and gum disease can erode years from your lifespan. Dentists per capita are lower than doctors, perhaps 0.6 per thousand. A dentist typically has a hygenist, a dental assistant and a receptionist. Assistants serve as combination nurses and record-keepers. One receptionist can manage several dentists. So, a thousand-member colony needs four people including one dentist while a 5,000 member colony needs ten people including three dentists.
Other healthcare services include physical therapy and nutrition. These can be baked into the medical numbers by adding another staff member per doctor. Mental health service in the form of a psychiatrist would be a specialist doctor at about 0.2 per thousand. Psychologists weigh in around 0.5 per thousand; the demand will be higher in space than on earth. I propose one psychologist and one counselor per thousand people, plus double the number of medical receptionists and provide them with training as counselors. Medical intake would be in a private environment, so every contact with a medical provider gives an opportunity to seek help.
I've taken an estimate based on earth numbers that suggests it takes about 10 people per hectare of greenhouse floor space for intensive vegetable production. I also assume that grains are much less labor-intensive (20%) because they do not need to be trimmed or trained and they can be batch-harvested with automated equipment. I intend to specify movable trays, perhaps on an automated conveyor or chain, passing through a stationary harvester; easy as handling a commercial dishwasher. My sheet suggests an area as small as 22m² of floor space per person can work; a more common estimate is 40m². Figure 50m² of growing area using racks; better to have too much space than not enough space. About half of that area is vegetables and the other half is grain. 10 people per hectare works out to 1000m² per worker in vegetable areas and 5000m² per worker in grain areas, or 3000m² per worker on average. That's enough for each worker to produce food for 60 people, or 16.7 workers per thousand. I propose we double that to account for maintenance, cleaning, building new racks, etc., plus to account for some of the species not being as easy to grow as tomatoes. That makes 33 hydroponics workers per thousand or 167 for 5000. A shift manager might handle about 20 people, while the overall system will require one manager with one assistant per 50 people. In total, the thousand-person colony needs 37 people and the 5000 person colony needs 180.
This depends a lot on the cultural structure of the colony. Cafeteria-style service requires the fewest people and the most efficient use of equipment. Restaurant-style service allows for more menu diversity while still specializing. Home cooking requires the most equipment and the least efficiency, but offers the most choice and individual freedom. I expect in a moderately large colony that there will be a mix of the three. Residential units might have a microwave and/or hotplate but probably not an oven. Storage is a factor as well; will there be power and cooling sufficient to have a refrigerator/freezer for food storage in the unit? That would be more Earth-like, but these devices are not very efficient. Restaurants would be a sort of hybrid; this environment is not a free market, there are strict limits on available resources. The menus would fit the theme of the restaurant but would also fit what the hydroponic systems can produce and would require the approval of a nutritionist.
Let's assume that the occupants are on rolling schedules, so there is no common 'noon hour' where everything shuts down. People still tend to cluster, so let's assume there are five busy periods that take most of the traffic. In order to serve 1000 people three meals a day that's 3000 meals, 600 per peak period. A restaurant serving 100 guests per hour needs about 11 people front-of-house and 6 people back-of-house plus a manager. Our thousand residents need 18 people per location and six locations, or 108 people. Maintaining that for 24-hour operation will take more. I break the day into 5 shifts and assume each person works two shifts five times a week (meaning each person is a full-time equivalent or FTE). The work requires 108 people on-hand during a shift, which means 108 * 5 * 7 = 3,780 shifts per week. If each worker handles 10 shifts per week then we need 378 people. That's 37.8% of the population, which seems a bit ridiculous. The extreme alternative is to go to a cafeteria model, which can turn out huge amounts of food in a short time with minimal staff. We don't have the luxury of bulk prepared ingredients, so even a cafeteria model in a habitat would still require an army of prep cooks. We can meet in the middle by specifying that people bus their own dishes, servers sanitize tables and the on-duty manager shares some of the hosting load. One of the main tasks for a server is drink refills, but water is the only realistic drink available; provide a potable water tap and people can fill their own cups as well. Another thought is that since the amount of meat will be much reduced, a larger portion of the work is in salads and fresh vegetables or in soups and long-cooking dishes, both of which take more prep and less line time. That should cut things down, eliminating two bussers, one host, two servers and a line cook. New numbers are 12 per location or 72 per shift or 252 FTE. 25.2% of the population still seems high; it might make sense to only provide four locations instead of six to account for in-home food prep. So, I'll specify 168 people for a thousand-person colony and 840 people for the 5000 person colony. The individual location managers would coordinate menus and food supplies, which may require an overseeing manager and staff (6 people) for the 5000 person colony.
Some might consider this part of maintenance. Realistically speaking a dirty but mechanically sound ship works fine, while a clean ship with broken life support is a dead ship. On the other hand, people hate living in filth. Staff estimates for other categories assume that those people are responsible for cleaning their work areas and individual people are responsible for their own living areas, so this entry covers any additional public areas; this should be about 30-40% of the overall floor space.
A custodian or janitor should be able to clean 180-370m² per hour; the low end is for medical facilities and the high end is for easy-clean office or public space. Let's assume 350m² per hour six days a week and a weekly deep-clean at 100m² per hour. Each 100m² then requires 2.7 hours of work every week; with 8 productive hours per shift a single FTE provides 40 hours a week and can clean 1,480m². I assign 100m² per person and 36% public space, but let's use 40% or 40m² per colonist. That means one FTE custodian can maintain public space for 37 people. I assume supervision at 1 per 20 employees.
This covers haircutting and other grooming / hygiene services including massage. Most people on a colony should be quite self-reliant, but it is hard to cut your own hair if you're not fond of a buzzcut. This is more of a convenience category, but it pays off in morale. Staff estimates may as well be a dartboard, but I'll assume 1% of the population offers these services full time.