Translations:Project:SPARQL/examples/23/en
SELECT ?person ?surname ?firstName ?birthDate WHERE {
?person wdt:P1 wd:Q2 . # Selects all elements that are (P1) persons (Q2) ?person wdt:P7 wd:Q102 . # Filters by residence (P7), here Anderlecht (Q102) (replace Q102 with the (section of) municipality of your choice using autocomplete (Control + space)) ?person wdt:P67 ?birthDate . # Adds the birth date (P67) ?person wdt:P3 ?surname . # Retrieves the surname (P3) ?person wdt:P2 ?firstName . # Retrieves the first name (P2) SERVICE wikibase:label { bd:serviceParam wikibase:language "en,[AUTO_LANGUAGE]". } # Retrieves the label in English
}