Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Assem Khidhr
.
Toggle Highlighting
SQL
SELECT DISTINCT ?item ?itemLabel_en ?image (SAMPLE(?itemLabel) AS ?itemLabel) (SAMPLE(?article) AS ?article) (SAMPLE(?languageLabel) AS ?languageLabel) WHERE { # Specify film and TV industry roles VALUES ?occ { wd:Q935666 #Film researcher wd:Q935666 #makeup artist wd:Q28389 #Screenwriter wd:Q101947581 #Production Accountant wd:Q5270608 #Dialogue editor wd:Q6941738 #Music editor wd:Q2526255 #Director wd:Q1757008 #Assistant directorwd:Q28135085 #Acting coach wd:Q21292974 #Production manager wd:Q222344 #Director of photography wd:Q4178004 #Publicist wd:Q943995 #Talent Manager wd:Q1093536 #Location manager wd:Q6409989 #Set decorator wd:Q2867219 #Production assistant wd:Q373709 #Boom operator wd:Q1639269 #Assistant camera wd:Q2961972 #Sound recordist wd:Q1424726 #Gaffer wd:Q2962070 #Production designer wd:Q1547003 #Key grip wd:Q1430377 #Propmaster wd:Q110133191 #Postproduction supervisor wd:Q17156829 #Music supervisor wd:Q1208175 #Camera operator wd:Q1111648 #Colorist wd:Q55187 #hairstylist wd:Q2707485 #Set designer wd:Q3237618 #Wardrobe stylist wd:Q8313 #Special effects coordinator wd:Q3024424 #Sound designer wd:Q2833480 #Stunt coordinator wd:Q1323191 #Costume designer wd:Q706364 #Art director wd:Q1263187 #Script Supervisor wd:Q36834 #Composer wd:Q33999 #Actor wd:Q2961972 #Production sound mixer wd:Q7042855 #Film Editor wd:Q758870 #Sound editor wd:Q3282637 #Producer wd:Q1826375 #Line producer wd:Q11999333 #Associate producer wd:Q1053574 #Executive Producer wd:Q1364080 #Visual effects producer wd:Q1049296 #Casting director wd:Q1415225 #Production coordinator wd:Q4220892 #Film critic } # Specify Country to filter by VALUES ?country {wd:Q79} ?item wdt:P106 ?occ; # Filter by specified occupations wdt:P27 ?country. # Filter by country (Morocco) # 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 wdt:P18 ?image. } # Pick non-local Wikipedia article OPTIONAL { # Get languages spoken by the person ?item wdt:P1412 ?language. SERVICE wikibase:label { bd:serviceParam wikibase:language 'en'. ?language rdfs:label ?languageLabel. } ?language wdt:P424 ?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
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...