User:MB-one/SDC

Camera lens from category not in SDC

SELECT ?title
WHERE {
  {
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
      bd:serviceParam mwapi:gcmtitle "Category:Taken with Olympus M.Zuiko Digital ED 12-100mm f/4 PRO" .
      bd:serviceParam mwapi:generator "categorymembers" .
      bd:serviceParam mwapi:gcmtype "file" .
      bd:serviceParam mwapi:gcmlimit "max" .
      ?title wikibase:apiOutput mwapi:title .
      ?pageid wikibase:apiOutput "@pageid" .
    }
    BIND(URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file)
  }
  FILTER NOT EXISTS { ?file wdt:P4082 wd:Q116719297 . }
}
ORDER BY ?title

Try it!

Breakdown of photo equipment (with optional role qualfier) used to create quality images

SELECT 
  ?equipment
  ?qualifier
  (COUNT(?item) AS ?count)
  (SAMPLE(?item) AS ?example_item)
WHERE {
  ?item wdt:P4082 ?equipment;
        wdt:P6731 wd:Q63348069.
  
  ?item p:P4082 ?statement.
  OPTIONAL {
    ?statement pq:P3831 ?qualifier.
  }
}
GROUP BY ?equipment ?qualifier
ORDER BY DESC(?count)

Try it!

MFT images without lens statement

SELECT DISTINCT ?quickcategory WHERE {
  # { ?file wdt:P4082 wd:Q28456857. } #Lumix GH5
  #UNION
  { ?file wdt:P4082 wd:Q20889187. } #Lumix GX8
  #UNION
  #{ ?file wdt:P4082 wd:Q7130084. } #Lumix G3
  #UNION
  #{ ?file wdt:P4082 wd:Q1379717. } #Lumix G5  
  #UNION
  #{ ?file wdt:P4082 wd:Q17049136. } #Lumix G6
  #  UNION
  #{ ?file wdt:P4082 wd:Q20649008. } #Lumix G70
    #UNION
  #{ ?file wdt:P4082 wd:Q131703691. } #Lumix GH6
      #UNION
  #{ ?file wdt:P4082 wd:Q126387724. } #Lumix GH7

  ?file wdt:P2151 ?focalLength;
    wdt:P6790 ?FStop;
    wdt:P571 ?inception;
    schema:contentUrl ?contentUrl.
# == Filters for focal length and F-stop ==
  
  FILTER(?focalLength > 25  && ?focalLength < 36 )
  FILTER(?FStop > 2.7 && ?FStop < 22.8)  
#== Excluded lenses ==
  
  MINUS { ?file wdt:P4082 wd:Q137719582. }
  MINUS { ?file wdt:P4082 wd:Q28448747. } #OLYMPUS M.8mm F1.8
  MINUS { ?file wdt:P4082 wd:Q7130076. }
  MINUS { ?file wdt:P4082 wd:Q60785693. }
  MINUS { ?file wdt:P4082 wd:Q137720097. }
  MINUS { ?file wdt:P4082 wd:Q28448747. }
  MINUS { ?file wdt:P4082 wd:Q137732732. }
  MINUS { ?file wdt:P4082 wd:Q122851377. }
  MINUS { ?file wdt:P4082 wd:Q137647033. }
  MINUS { ?file wdt:P4082 wd:Q137650462. }
  MINUS { ?file wdt:P4082 wd:Q137669364. }
  MINUS { ?file wdt:P4082 wd:Q137718371. }
  MINUS { ?file wdt:P4082 wd:Q24910294. }
  MINUS { ?file wdt:P4082 wd:Q21175643. }
  MINUS { ?file wdt:P4082 wd:Q7130075. }
  MINUS { ?file wdt:P4082 wd:Q137735292. }
  MINUS { ?file wdt:P4082 wd:Q137787473. } #OLYMPUS M.8-25mm F4.0
  MINUS { ?file wdt:P4082 wd:Q116719316. } #OLYMPUS M.7-14mm F2.8
  MINUS { ?file wdt:P4082 wd:Q137720165. } #Leica DG 10-25
  MINUS { ?file wdt:P4082 wd:Q137737464. } #Leica DG 12 F1.4
  MINUS { ?file wdt:P4082 wd:Q137669386. } #Lumix G X 12-35
  MINUS { ?file wdt:P4082 wd:Q137796502. } #Leica DG 12-35
  MINUS { ?file wdt:P4082 wd:Q137796333. } #Lumix G 12-60 F3.5-5.6
  MINUS { ?file wdt:P4082 wd:Q116719314. } #OLYMPUS M.45mm F1.2
  MINUS { ?file wdt:P4082 wd:Q137718304. } #OLYMPUS M.75mm F1.8
  
# == Excluded creators ==
  ?file p:P170 ?statement.
  MINUS { ?statement pq:P2093 "Leonhard Lenz". }
  MINUS { ?statement pq:P2093 "Andreas Eichler". }
  MINUS { ?statement pq:P2093 "debsaslaw". }
  MINUS { ?statement pq:P2093 "School of Media and Public Affairs at GWU". }
  MINUS { ?statement pq:P2093 "Loloito78". }
  MINUS { ?statement pq:P2093 "StefanBoonen1". }
  MINUS { ?statement pq:P2093 "Rashed hajji al hajji". }
  MINUS { ?statement pq:P2093 "Mark Dixon". }
  MINUS { ?statement pq:P2093 "OtterBoyGVA". }
  MINUS { ?statement pq:P2093 "TheNoxid". }
  MINUS { ?statement pq:P2093 "Yves Tennevin". }
  MINUS { ?statement pq:P2093 "Codingexperiences". }
  MINUS { ?statement pq:P2093 "School Strike". }
  MINUS { ?statement pq:P2093 "Guellouz Mehdi". }
  MINUS { ?statement pq:P2093 "Sparktour". }
  MINUS { ?statement pq:P2093 "Rolf Dietrich Brecher". } # no lens information
  MINUS { ?statement pq:P2093 "Swirliehead". } # no lens information
  MINUS { ?statement pq:P2093 "MiriamPschtto". } # no lens information
  MINUS { ?statement pq:P2093 "Andy Beecroft". } # no lens information
  MINUS { ?statement pq:P2093 "Shinmaebashi". } # no lens information
  MINUS { ?statement pq:P2093 "Adsum Dixit". } # no lens information
  MINUS { ?statement pq:P2093 "Jean-Jacques Lasmolles". } # no lens information
  MINUS { ?statement pq:P2093 "Adalberto Cencetti". } # no lens information
  MINUS { ?statement pq:P2093 "David Dixon". } # no lens information
  MINUS { ?statement pq:P2093 "Santeri Viinamäki". } # no lens information
  MINUS { ?statement pq:P2093 "KO KUYO". } # no lens information
  MINUS { ?statement pq:P2093 "ChowJoe3". } # no lens information
  MINUS { ?statement pq:P2093 "TyDieOfficial". } # no lens information
  MINUS { ?statement pq:P2093 "Elcapitana1". } # no lens information
  MINUS { ?statement pq:P2093 "The National Guard". } # no lens information
  MINUS { ?statement pq:P2093 "Membeth". } # no lens information
  { ?statement pq:P2093 "Julian Paren". }


# == Create QuickCategory code ==  
  BIND(wikibase:decodeUri(STR(IRI(?contentUrl))) AS ?decodedUrl)
  BIND(REPLACE(STR(?decodedUrl), "^.*/", "") AS ?filenameWithExt)
  BIND(CONCAT("File:", ?filenameWithExt, "

Try it!