first attempt - Wikidata query supporting updates in Feb 2024 edit

Link to query

Query syntax edit

#People sharing the surname Johnston

SELECT ?person ?personLabel ?article
WHERE
{
  ?person wdt:P31 wd:Q5 .   # human
  ?person wdt:P734 wd:Q1565753.
  ?article schema:about ?person .
  ?article schema:isPartOf <https://en.wikipedia.org/>.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

--User:Ceyockey (talk to me) 04:52, 7 February 2024 (UTC)Reply

second attempt - Wikidata query supporting updates in Feb 2024 edit

This returns significantly more info. The output can be reformatted in a spreadsheet program to assist in editing in source editing mode.

#People sharing the surname Johnston
#retrieving wikipedia article
#ordered by article link
SELECT ?person ?article ?DOB ?DOD ?DESC
WHERE
{
  ?person wdt:P31 wd:Q5 .   # human
  ?person wdt:P734 wd:Q1565753 .
  ?article schema:about ?person . 
  ?article schema:isPartOf <https://en.wikipedia.org/>.
  OPTIONAL {?person wdt:P569 ?DOB }
  OPTIONAL {?person wdt:P570 ?DOD }
  OPTIONAL {?person schema:description ?DESC}
  FILTER(LANG(?DESC) = "en")
}
ORDER BY ?article

--User:Ceyockey (talk to me) 21:35, 10 February 2024 (UTC)Reply