Minecraft wiki entry for Target_selectors, associated text: @a[advancements={story/smelt_iron=true}] — Include only players who have completed the advancement minecraft:story/smelt_iron.
@a[advancements={story/form_obsidian=false}] — Include only players who haven't completed the advancement minecraft:story/form_obsidian.
@a[advancements={story/follow_ender_eye=true}] is the same as @a[advancements={story/follow_ender_eye={in_stronghold=true}}].
@a[advancements={adventure/kill_all_mobs={witch=true}}] — Include only players who have killed a witch, for the advancement minecraft:adventure/kill_all_mobs.