Project:SPARQL/examples: Difference between revisions

Line 1: Line 1:
==SAL==
==SAL and RAI==


===People who signed nomination for SAL elections based on personal knowledge, sorted by frequency of signatures===
===People who signed nomination for SAL elections based on personal knowledge, sorted by frequency of signatures===
Line 84: Line 84:
}
}
# I don't know how to use 'edgeLabel' to show the types of interaction, but if you have an idea suggest an edit!
# I don't know how to use 'edgeLabel' to show the types of interaction, but if you have an idea suggest an edit!
</sparql>
===People whose elections were proposed to RAI linked in a graph to those who proposed and seconded their nomination for election===
<sparql tryit="1">
# People whose elections were proposed to RAI linked in a graph to those who proposed and seconded their nomination for election
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
#defaultView:Graph
SELECT ?person ?personLabel ?rgb ?RAIproposed ?RAIproposedLabel ?RAIseconded ?RAIsecondedLabel WHERE
{
  ?person bnwdt:P3 bnwd:Q3 .
  ?person bnp:P7 ?RAIstatement .
  ?RAIstatement bnps:P7 ?RAIproposed .
  OPTIONAL {?RAIstatement bnpq:P8 ?RAIseconded .}
    SERVICE wikibase:label {
      bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
    }
BIND( "7C4DCD" AS ?rgb ) .
}
ORDER BY ?date
</sparql>
</sparql>