Project:SPARQL/examples: Difference between revisions

From The SHARE Catalogue mapping knowledge base
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 14: Line 14:
   }
   }
ORDER BY DESC (?statements)
ORDER BY DESC (?statements)
</sparql>
===Tutti i tag non ripetibili con relativa occorrenza(P6)===
<sparql tryit="1">
#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". }
  }
</sparql>
</sparql>

Revision as of 13:41, 21 December 2023

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!


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!