Beyond the obvious of making sure you do not select fish that have health issues, you should also consider the environment the fish are displayed in. Retail aquariums that use UG filtration systems often have very acidic water. This can be a problem when you introduce the fish to an aquarium that has an alkaline pH, as pH shock can occur causing fish mortality a few days after introduction. The same is true from large differences in TDS, as osmotic shock can cause fish mortality within a few days. pH and osmotic shock are likely responsible for many unexplained freshwater fish deaths a few days after introduction to a new aquarium. Testing the water from the retailers aquarium before introducing fish to your aquarium to make sure there is not a big difference in water chemistry can save many fish lives.
If you plan on having live plants in the aquarium, you should make sure the fish you select are compatible with the plants you plan on keeping. Some plecostomus species will eat many aquatic plant species. Some plants may be safe while others will be eaten by some species of fish.
Introducing new fish to an aquarium that has fish that can be aggressive or territorial can pose problems. Fish that are established can attack and eventually kill new fish if there is not enough hiding places in the aquarium. In cases where the aquarium has fish that can be aggressive, it is recommended that you introduce at least four of the same species of fish at a time to spread out the amount of aggression the established fish can deliver. This technique can mean the difference between an successful introduction and a disastrous one. This technique works very well for stocking a Lake Malawi mbuna biotope aquarium.