First install Semantic Mediawiki.
Then use parser function #ask for inline queries ... <--- more details how to, at this link.
See a SMW demo article at Berlin or Paris and how the info from these is then included in a Table of Cities on another page.