User:Kbseah

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Problems

[edit]

Can't find these names

This edit: https://commons.wikimedia.org/w/index.php?title=File:Difflugia_bidens.png&diff=prev&oldid=734792760

Commons Query Service queries

[edit]

Wikimedia Commons Query Service

# Files in Category without depicts statement

SELECT ?file ?title
WHERE
{
  SERVICE wikibase:mwapi
          {
            bd:serviceParam wikibase:api "Generator" .
            bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
            bd:serviceParam mwapi:gcmtitle "Category:Microscopic images relating to biology" .
            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:P180 ?depicts
  })
}

Try it!

# Files in Category with depicts statements

SELECT ?file ?title ?depicts ?image
WITH {
  SELECT ?file ?title
         WHERE {
           SERVICE wikibase:mwapi
                   {
                     bd:serviceParam wikibase:api "Generator" .
                     bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
                     bd:serviceParam mwapi:gcmtitle "Category:Microscopic images relating to biology" .
                     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)
         }
} AS %files
WHERE {
  INCLUDE %files
  ?file wdt:P180 ?depicts.
  ?file schema:url ?image
}

Try it!


Images that are fabricated with a subclass of electron microscopy

#defaultView:ImageGrid

SELECT ?file ?image

WITH {
  SELECT ?fabmethod WHERE {
    SERVICE <https://query.wikidata.org/sparql> {
        ?fabmethod wdt:P279* wd:Q68535882
     } 
  }
} AS %get_items

WHERE {
  INCLUDE %get_items
  ?file wdt:P180 ?item;
        schema:url ?image;
        wdt:P2079 ?fabmethod
} LIMIT 100

Try it!

Images depicting Cercozoa

#defaultView:ImageGrid

SELECT ?file ?image

WITH {
  SELECT ?item WHERE {
    SERVICE <https://query.wikidata.org/sparql> {
        ?item wdt:P171/wdt:P171* wd:Q500497.
     } 
  }
} AS %get_items

WHERE {
  INCLUDE %get_items
  ?file wdt:P180 ?item .
  ?file schema:url ?image
}

Try it!

Fabrication methods, with item counts