Usuari:Amadalvarez/proves1
Aparença
Còpia de queries en treball |
#title Estats que tenen un determinat himne nacional
SELECT distinct ?item ?inici ?final
WHERE {
?item wdt:P85 wd:Q251918 .
?item p:P85 ?p85stm.
?p85stm wikibase:rank ?rank.
FILTER (?rank = wikibase:PreferredRank|
#title:list of recorded track from one specific composition, and all the releases (single/album, etc.) where using
# "?item" are the tracks
# "?album" are the release with tracks in ites P658
SELECT distinct ?item ?itemLabel ?tipus ?interpret ?interpretLabel ?gravat_a ?data_enreg ?gravat_edit ?product_trk ?product_rls ?productor
?durada_edit ?durada ?album ?albumLabel ?pista ?data_publi ?draft WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
# Yesterday ?item wdt:P2550 wd:Q202698.
# Self Control ?item wdt:P2550 wd:Q1550581.
?item wdt:P2550 wd:Q368735. # With a Little Help from My Friends
OPTIONAL { ?item wdt:P31 ?tipus_trk. }
OPTIONAL { ?item wdt:P175 ?interpret. }
OPTIONAL { ?item wdt:P10135 ?data_enreg. }
OPTIONAL { ?item wdt:P483 ?gravat_a. }
OPTIONAL { ?item wdt:P2047 ?durada_trk. }
OPTIONAL { ?item wdt:P162 ?product_trk. }
OPTIONAL { ?album p:P658 ?statement.
?statement ps:P658 ?item.
OPTIONAL {?statement pq:P1545 ?pista.}
OPTIONAL {?statement pq:P2047 ?durada_rls.}
OPTIONAL { ?album wdt:P31 ?tipus_rls. }
OPTIONAL { ?album wdt:P577 ?data_publi. }
OPTIONAL { ?album wdt:P162 ?product_rls. }
}
BIND(IF(BOUND(?tipus_rls), ?tipus_rls, ?tipus_trk )
as ?tipus).
BIND(IF(BOUND(?durada_rls), ?durada_rls, ?durada_trk )
as ?durada).
bind(floor(?durada / 60) as ?min)
bind(floor(?durada - ?min * 60) as ?seg)
bind(CONCAT(str(?min), ":", IF(?seg < 10,"0",""), str(?seg)) as ?durada_edit)
BIND(IF(BOUND(?product_rls), ?product_rls, ?product_trk )
as ?productor).
# _______________________________________ Creació llapis per enllaçar a WD per modificar continguts
BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/", "", "i") AS ?itemId)
BIND(CONCAT("[", "[", "File:Arbcom ru editing.svg|12px|center|",
"Modifica les dades a Wikidata
- Summary of versions and albums with Yesterday (Q202698).
Fi de la llista autogenerada.