Sawflies are wasp-like insects that are in the suborder Symphyta within the order Hymenoptera, alongside ants, bees, and wasps. The common name comes from the saw-like appearance of the ovipositor, which the females use to cut into the plants where they lay their eggs. The name is associated especially with the Tenthredinoidea, by far the largest superfamily in the suborder, with about 7,000 known species; in the entire suborder, there are 8,000 described species in more than 800 genera. Symphyta is paraphyletic, consisting of several basal groups within the order Hymenoptera, each one rooted inside the previous group, ending with the Apocrita which are not sawflies.
Sawfly
Larvae of Nematus miliaris
Sawfly laying eggs in a plant, using the serrated saw-like ovipositor for which the group is named
Anaxyeloidea: Syntexis libocedrii
A wasp is any insect of the narrow-waisted suborder Apocrita of the order Hymenoptera which is neither a bee nor an ant; this excludes the broad-waisted sawflies (Symphyta), which look somewhat like wasps, but are in a separate suborder. The wasps do not constitute a clade, a complete natural group with a single ancestor, as bees and ants are deeply nested within the wasps, having evolved from wasp ancestors. Wasps that are members of the clade Aculeata can sting their prey.
Wasp
Polistes sp., India
Megascolia procer, a giant solitary species from Java in the Scoliidae. This specimen's length is 77 mm (3.0 in) and its wingspan is 115 mm (4.5 in).
Megarhyssa macrurus, a parasitoid. The body of a female is 50 mm (2.0 in) long, with a c. 100 mm (3.9 in) ovipositor