Project:SPARQL/examples: Difference between revisions

From The SHARE Catalogue mapping knowledge base
Jump to navigation Jump to search
Line 30: Line 30:
    
    
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it,fr". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it,fr". }
  }
ORDER BY ?itemLabel
</sparql>
===Tutti i tag che contengono la proprietà "mappato in forma tabellare"===
<sparql tryit="1">
#title: Tutti i tag che contengono la proprietà "mappato in forma tabellare"
PREFIX wd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX wdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabel ?TableURL
WHERE
{
  ?item wdt:P14 ?TableURL .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
   }
   }
ORDER BY ?itemLabel
ORDER BY ?itemLabel

Revision as of 11:50, 8 July 2024

Tutti i sottocampi creati

#title: Tutti i subfield creati
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT ?tagLabel ?subfield ?subfieldLabel ?subfieldAltLabel ?occurrenceLabel ?repeatabilityLabel
WHERE
{
  ?subfield uni2bfwdt:P1 uni2bfwd:Q2059 .
  OPTIONAL {?subfield uni2bfwdt:P6 ?occurrence ; uni2bfwdt:P7 ?repeatability .}
  ?subfield uni2bfwdt:P4 ?tag .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }
ORDER BY ?subfieldAltLabel ?subfieldLabel

Try it!


Tutti i tag con gli indicatori (quando presenti)

#title: Tutti i tag con la descrizione degli indicatori, quando presenti
PREFIX wd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX wdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?item ?itemLabel ?itemDescription ?ind1Label ?ind2Label
WHERE
{
  ?item wdt:P1 wd:Q125 .
  OPTIONAL {?item wdt:P11 ?ind1 . }
  OPTIONAL {?item wdt:P12 ?ind2 . }
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it,fr". }
  }
ORDER BY ?itemLabel

Try it!


Tutti i tag che contengono la proprietà "mappato in forma tabellare"

#title: Tutti i tag che contengono la proprietà "mappato in forma tabellare"
PREFIX wd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX wdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabel ?TableURL 
WHERE
{
  ?item wdt:P14 ?TableURL .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }
ORDER BY ?itemLabel

Try it!


Tag del blocco 6-- con indicatori

#title: Tag del blocco 6-- con indicatori
PREFIX wd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX wdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?item ?itemLabel ?itemDescription ?ind1Label ?ind2Label
WHERE
{
  ?item wdt:P1 wd:Q125 .
  ?item wdt:P4 wd:Q90 .
  OPTIONAL {?item wdt:P11 ?ind1 . }
  OPTIONAL {?item wdt:P12 ?ind2 . }
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it,fr". }
  }
ORDER BY ?itemLabel

Try it!


Tutti gli item dove per occorrenza (P6) è presente una condizione (P8)

PREFIX wd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX wdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>
PREFIX p: <https://unimarc2bibframe.wikibase.cloud/prop/> 
PREFIX ps: <https://unimarc2bibframe.wikibase.cloud/prop/statement/> 
PREFIX psv: <https://unimarc2bibframe.wikibase.cloud/prop/statement/value/> 
PREFIX psn: <https://unimarc2bibframe.wikibase.cloud/prop/statement/value-normalized/> 
PREFIX pq: <https://unimarc2bibframe.wikibase.cloud/prop/qualifier/>
PREFIX pqv: <https://unimarc2bibframe.wikibase.cloud/prop/qualifier/value/> 
PREFIX pqn: <https://unimarc2bibframe.wikibase.cloud/prop/qualifier/value-normalized/> 
PREFIX pr: <https://unimarc2bibframe.wikibase.cloud/prop/reference/> 
PREFIX prv: <https://unimarc2bibframe.wikibase.cloud/prop/reference/value/> 
PREFIX prn: <https://unimarc2bibframe.wikibase.cloud/prop/reference/value-normalized/> 

SELECT ?item ?itemtypeLabel ?itemLabel ?itemAltLabel ?occurrenceLabel ?requirementLabel
WHERE
{
 ?item wdt:P1 ?itemtype . 
 ?item p:P6 [ps:P6 ?occurrence;
               pq:P8 ?requirement;].
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  }

Try it!

Tutti gli elementi che contengono P5(aggiornamento utilizzato) ordinati per numero di dichiarazioni

#title: Tutti gli elementi che contengono P5(aggiornamento utilizzato) ordinati per numero di dichiarazioni decrescente
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

select ?item ?itemLabel ?itemDescription ?itemAltLabel ?update_year ?statements
WHERE
{
  ?item uni2bfwdt:P5 ?update_used .
  ?item wikibase:statements ?statements .
  BIND(YEAR(?update_used) as ?update_year)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  }
ORDER BY DESC (?statements)

Try it!


Tag senza Aggiornamento utilizzato (P5)

#title: Tag che non contengono P5(aggiornamento utilizzato)
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

select ?item ?itemLabel
WHERE
{
  ?item uni2bfwdt:P1 uni2bfwd:Q125 . 
  MINUS {?item uni2bfwdt:P5 ?update_used .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it,fr,en". }
  }
ORDER BY ?itemLabel

Try it!


Tag del blocco 5-- senza Aggiornamento utilizzato (P5)

#title: Tag blocco 5-- senza Aggionramento utilizzato (P5)
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?item ?itemLabel ?itemDescription
WHERE
{
  ?item uni2bfwdt:P4 uni2bfwd:Q89 .
  MINUS {?item uni2bfwdt:P5 ?update .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,it". }
  }
ORDER BY ?item

Try it!


Tutti i tag non ripetibili con relativa occorrenza(P6)

#title: Tutti i tag non ripetibili con relativa occorrenza(P6)
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?item ?itemLabel ?itemDescription ?occurrenceLabel
WHERE
{
  ?item uni2bfwdt:P7 uni2bfwd:Q22 ;
        uni2bfwdt:P6 ?occurrence .
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Try it!


Tutti i tag del blocco 0-- con indicatori

#title: Tutti i tag del blocco 0-- con la descrizione degli indicatori (quando presenti)
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?item ?itemLabel ?itemDescription ?ind1Label ?ind2Label ?occurrenceLabel ?repeatabilityLabel ?update_year
WHERE
{
  ?item uni2bfwdt:P4 uni2bfwd:Q1 .
  OPTIONAL {?item uni2bfwdt:P11 ?ind1 . }
  OPTIONAL {?item uni2bfwdt:P12 ?ind2 . }
  OPTIONAL {?item uni2bfwdt:P6 ?occurrence .}
  OPTIONAL {?item uni2bfwdt:P7 ?repeatability .}
  OPTIONAL {?item uni2bfwdt:P5 ?update_used .}
  BIND(YEAR(?update_used) as ?update_year)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,it". }
  }
ORDER BY ?itemLabel

Try it!


Tutti i subfield del tag 210

#title: Tutti i subfield del tag 210 (Q2029)
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT ?tag ?tagLabel ?subfield ?subfieldLabel ?repeatabilityLabel
WHERE
{
  ?subfield uni2bfwdt:P4 uni2bfwd:Q2029;
            uni2bfwdt:P7 ?repeatability.
  ?tag uni2bfwdt:P3 ?subfield .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Try it!


Aggiornamenti dei tag del blocco 2-- come timeline

#defaultView:Timeline
#title: Timeline aggiornamenti dei tag del blocco 2--
PREFIX uni2bfwd: <https://unimarc2bibframe.wikibase.cloud/entity/>
PREFIX uni2bfwdt: <https://unimarc2bibframe.wikibase.cloud/prop/direct/>

SELECT  ?itemLabel ?update_used
WHERE
{
  ?item uni2bfwdt:P4 uni2bfwd:Q12 .
  OPTIONAL {?item uni2bfwdt:P6 ?occurrence .}
  OPTIONAL {?item uni2bfwdt:P7 ?repeatability .}
  OPTIONAL {?item uni2bfwdt:P5 ?update_used .}
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,it". }
  }
ORDER BY ?item

Try it!