query-7e6738ccbecda6d527630e22b449844b

rq turtle/ttl

WikiFlix 📽🍿🤩Good day! I have an idea for a query and got started on it, but could use some help refining: a list or grid of all (full-length) movies that can be legally watched via Wikidata items and videos on Commons. Aka WikiFlix ;-) - potentially once to be grouped by decade, or even by year. Here are some of the refinements I'd like to get some help with, and other optimizations and tweaks are very welcome: https://w.wiki/B95Here's the query on which I got started: Any other layout and data display improvements are very welcome too Sort them by date - earliest first, most recent last Remove duplicates, potentially by clustering the genres, directors etc statement)(P10)video qualifier in the (Q622550)trailer -> (P3831)object of statement has role Filter out the trailers; only show items for which we have the full length video on Commons (trailers have a on Wikimedia Commons uses a dedicated row template that perhaps can be tweaked for this purpose. This Listeria-driven galleryAdditionally, I'm wondering if we can generate nice-looking galleries for them on Wikimedia Commons, potentially by decade, and display the video with each item, so that each film can immediately be watched? 15:27, 31 October 2019 (UTC) 💬 SpinsterThanks & greetings! 21:39, 31 October 2019 (UTC) 💬 Spinster property, so that we can create a nice list or gallery out of them. Help is welcome. Thanks, (P10)video Hi Jura, thanks for the tip. That's not exactly what I'm looking for - I'm asking for some help to optimize a query of all existing Wikidata items that have a full-length video already, on Wikimedia Commons, via the 20:00, 31 October 2019 (UTC) JuraSome time ago, someone wrote a blog post about finding the ones for Wikidata items available at Internet archives .. I think it was mentioned in the weekly news. --- 07:35, 8 November 2019 (UTC) Jura. --- Wikidata:WikiProject Movies/reports/p10: I adapted your query at Spinster@ 22:14, 14 November 2019 (UTC)) talk (HuskyHere's Spinsters and Jura's query adapted a bit. I'm now including all items with a movie file, but only if they have a IMDB property and a duration property that is at least 40 minutes (the Academy Awards standard for feature-length). And no trailers.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid
select distinct 
  ?movie ?movieLabel (min(year(?pubdate)) as ?year) (min(?duration) as ?durationTime) ?imdb (sample(?video) as ?videoFile) where {

  ?movie wdt:P10 ?video;      
         wdt:P2047 ?duration; 
         wdt:P345 ?imdb.      

  optional { ?movie wdt:P577 ?pubdate. }

  # Filter out trailers
  minus { ?movie p:P10 [pq:P3831 wd:Q622550] }

  # For the Academy Awards a movie should at least be 40 minutes
  filter (?duration > 39). 

  service wikibase:label { bd:serviceParam wikibase:language "en". }
} group by ?movie ?movieLabel ?year ?duration ?imdb ?video order by ?movieLabel

Query found at