updated SPARQL query
Okumaya devam et...
← Previous revision | Revision as of 03:43, 9 May 2024 |
Line 1: | Line 1: |
{{Wikidata list|sparql=SELECT ?item ?itemLabel_en ?image (SAMPLE(?itemLabel) AS ?itemLabel) (SAMPLE(?article) AS ?article) (SAMPLE(?languageLabel) AS ?languageLabel) | |
{{Wikidata list | |
WHERE | |
|sparql=SELECT ?item WHERE { VALUES ?occ { wd:Q28389 wd:Q2526255 wd:Q33999 wd:Q222344 wd:Q3180462 wd:Q266569 wd:Q7042855 wd:Q1323191 wd:Q935666 wd:Q7042855 } ?item (wdt106/(wdt279*)) ?occ; wdt106 ?occupation. ?occupation (wdt279*) ?occ. ?item wdt27 wd:Q1019. OPTIONAL { ?article schema:about ?item; schema: <https://en.wikipedia.org/>; schema:name ?sitelink. } FILTER NOT EXISTS { ?wen schema:about ?item . ?wen schema:inLanguage 'en' } SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en'. ?item rdfs:label ?itemLabel. ?occupation rdfs:label ?occupationLabel_. } } GROUP BY ?item ?itemLabel ?article ?sitelink LIMIT 1000 | |
{ | |
|columns=label:Article,description,item | |
# Specify film and TV industry roles | |
|section=131 | |
VALUES ?occ {wd:Q935666 wd:Q28389 wd:Q101947581 wd:Q5270608 wd:Q6941738 wd:Q2526255 wd:Q1757008 wd:Q28135085 wd:Q21292974 wd:Q222344 wd:Q4178004 wd:Q943995 wd:Q1093536 wd:Q6409989 wd:Q2867219 wd:Q373709 wd:Q1639269 wd:Q2961972 wd:Q1424726 wd:Q2962070 wd:Q1547003 wd:Q1430377 wd:Q110133191 wd:Q17156829 wd:Q1208175 wd:Q1111648 wd:Q55187 wd:Q2707485 wd:Q3237618 wd:Q8313 wd:Q3024424 wd:Q2833480 wd:Q1323191 wd:Q706364 wd:Q1263187 wd:Q36834 wd:Q33999 wd:Q2961972 wd:Q7042855 wd:Q758870 wd:Q3282637 wd:Q1826375 wd:Q11999333 wd:Q1053574 wd:Q1364080 wd:Q1049296 wd:Q1415225 wd:Q4220892} | |
|min_section=3 | |
# Specify Country to filter by | |
VALUES ?country {wd:Q1019} | |
?item wdt106 ?occ; # Filter by specified occupations | |
wdt27 ?country. # Filter by country (Madagascar) | |
# Ensure item is NOT on local Wikipedia | |
FILTER NOT EXISTS { ?wen schema:about ?item . ?wen schema:inLanguage 'en' } | |
# Retrieve label | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language 'en'. | |
?item rdfs:label ?itemLabel_en. | |
} | |
OPTIONAL { | |
?item wdt18 ?image. | |
} | |
# Pick non-local Wikipedia article | |
OPTIONAL { | |
# Get languages spoken by the person | |
?item wdt1412 ?language. | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language 'en'. | |
?language rdfs:label ?languageLabel. | |
} | |
?language wdt424 ?langCode. | |
# Get the item's label in the specified language | |
?item rdfs:label ?itemLabel. | |
FILTER(LANG(?itemLabel) = ?langCode) | |
# Construct Wikipedia URL for the specified language | |
BIND(URI(CONCAT("https://", ?langCode, ".wikipedia.org/")) AS ?articleLink) | |
?article schema:about ?item; | |
schema:isPartOf ?articleLink. | |
?article schema:name ?sitelink. | |
} | |
} | |
GROUP BY ?item ?itemLabel_en ?image | |
LIMIT 5000 | |
|columns=number:#, ?itemLabel_en:Missing Article, ?article:Available article, ?languageLabel:Language spoken, P18: Image, item: Wikidata | |
|section=P106 | |
|min_section=1 | |
|sort=label | |sort=label |
|links=text | |links=red |
|thumb=128 | |thumb=128 |
|autolist=fallback | |autolist=fallback |
Line 11: | Line 54: |
|wdedit=yes | |wdedit=yes |
}} | }} |
... (This will be overwritten by ListeriaBot) ... | |
== == | |
{| class='wikitable sortable wd_can_edit' | |
! Article | |
! description | |
! item | |
|- class='wd_q100257809' | |
|class='wd_label'| Haminiaina Ratovoarivony | |
|class='wd_desc'| Madagascan screenwriter, film director, actor and producer (born 1977) | |
| [[:d:Q100257809|Q100257809]] | |
|- class='wd_q27659716' | |
|class='wd_label'| Joseph Rakuturahalahy | |
|class='wd_desc'| Slovene architect and musician | |
| [[:d:Q27659716|Q27659716]] | |
|- class='wd_q100257605' | |
|class='wd_label'| Luck Razanajaona | |
|class='wd_desc'| Madagascan film director | |
| [[:d:Q100257605|Q100257605]] | |
|- class='wd_q112148561' | |
|class='wd_label'| Nisha Gaelle Iarijhon | |
|class='wd_desc'| Malagasy filmmaker | |
| [[:d:Q112148561|Q112148561]] | |
|- class='wd_q125168709' | |
|class='wd_label'| Olga Rabenirainy | |
|class='wd_desc'| television journalist in Madagascar | |
| [[:d:Q125168709|Q125168709]] | |
|- class='wd_q29021393' | |
|class='wd_label'| Solo Ignace Randrasana | |
|class='wd_desc'| Malagasy film director | |
| [[:d:Q29021393|Q29021393]] | |
|} | |
---- | |
∑ 6 items. | |
{{Wikidata list end}} | {{Wikidata list end}} |
Okumaya devam et...