Aggression
Basic Compatibility | Con-Specifics | Breeding
Basic Compatibility
Most fish stores will be able to tell you if fish fall into one of three categories. Most are classed Community, Semi-Aggressive, or Aggressive. These terms are somewhat useful, but many fish differ from the rules of their family group, which most people use to rate what can go with what. Tetras are often classed as Community, however many such as Buenos Aires Tetras will chew the fins off any or even eat small tank mates. Others such as Emperor Tetras defend a territory, and you can have 1 male to a tank with as many females as you want.
Barbs are often classed semi-aggressive, while many small species cherry barbs and checkered barbs in particular can be kept with anything but the most peaceful fish. larger barbs are almost always semi-aggressive fin nippers, but many will restrict their behavior to their own species if kept in appropriate numbers.
Live bearers are considered by many to be community fish, but in my experience they can be quite combative with each other. if you keep very few males and many females of the same species this can be minimized but the males really don't like each other.
Gouramis are often considered a fish that should be single. in reality most can be kept in pairs provided one is male and the other female. Sometimes you can get away with two females, but not always. Other species like bettas should be left alone unless you are trying to breed them. The males have a tendency of harassing the females.
All cichlids will be automatically classed as aggressive in most fish stores. There are numerous species of less combative cichlids. Most Rift Lake cichlids are aggressive and will beat up tank mates trying to compete for the same hiding places, yet can be combined with fish that do not have the same behavioral patterns with no problem. Many smaller South American and African river species can be combined with peaceful schooling fish with no problem as long as you keep from adding other predator type fish. many cichlids also pair bond, so keeping a male and a female would work just fine.
Other fish such as loaches can vary widely in temperament. Many are schooling fish and do better with friends. Others are vicious with fish their own type. If an animal is a recent import many people just don't know how it would react yet.
That said ask around at a fish store, but also watch the fishes behavior in the tanks. If the species is all grouped together, and actively following each other they are likely schooling fish. If every fish is the same distance apart in the tank and they sometimes charge each other that fish would likely be quite happy alone.
Con-specifics
Fish that bear a resemblance in body shape or finnage to another species. An example is a male Betta splendens. They can often be aggressive towards any fish with showy fins, or colors that resemble another betta. The Betta treats those fish as he would one of his own species. Since Bettas are territorial, this can lead to death of the other fish. The trunkfishes, including the red-tailed shark and rainbow shark are of this attitude. They are best as a single fish in the tank, even the separate species will fight if given the option.
Breeding
Once a fish gets it's interest set on breeding, all other bets are off about compatibility. Young cichlids will often school, but once they start pairing off, expect them to beat each other up a lot over territory. Many other fish breed best in pairs, and males will get combative about the females. Expect some beating to occur if anyone decides to breed.

