Separate licenses are required for each field (building, electrical, plumbing, and mechanical). There are examinations required for each field. Electrical and plumbing also require state licenses before applying for examination with the city.
Under no circumstances is a Plumbing Contractor allowed to any electrical or mechanical work unless they also hold the appropriate, additionally required, licenses.