I want to retrieve informations from soccer player wikipedia inforboxes with the following properties (name, team, team number, apperances, goals) using the URIs returned by this wikidata query:
SELECT ?SoccerPlayer ?SoccerPlayerLabel ?Team ?TeamLabel ?TeamNumber ?numMatches ?numGoals ?startTime ?article WHERE
{?SoccerPlayer wdt:P106 wd:Q937857;
p:P54 ?stmt .
?stmt ps:P54 ?Team;
pq:P1350 ?numMatches;
pq:P1351 ?numGoals;
pq:P580 ?startTime .
optional {?stmt pq:P1618 ?TeamNumber} filter not exists {?SoccerPlayer p:P54/pq:P580 ?startTimeOther filter(?startTimeOther > ?startTime)}
FILTER(?startTime >= "2018-01-01T00:00:00Z"^^xsd:dateTime).
OPTIONAL { ?article schema:about ?SoccerPlayer .
?article schema:isPartOf <https://en.wikipedia.org/> . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".} } limit 200