Translations:Project:SPARQL/examples/54/en: Difference between revisions

From Resistance in Belgium
(Importing a new version from external source)
 
(No difference)

Latest revision as of 18:26, 15 October 2024

Message definition (Project:SPARQL/examples)
?person wdt:P1 wd:Q2 .                  # Selects persons (P1 = Q2)
  ?person wdt:P4 wd:Q6 .                  # Filters to select women (P4 = female Q6)
  
  ?person p:P53 ?detention_statement .    # Searches for persons who were detained (P53)
  ?detention_statement ps:P53 ?detention .
          
  OPTIONAL { ?detention_statement pq:P23 ?startOfDetention. FILTER (datatype(?startOfDetention) = xsd:edtf ) } # Retrieves the start of detention date if available (P23)
  OPTIONAL { ?detention_statement pq:P25 ?endOfDetention. FILTER (datatype(?endOfDetention) = xsd:edtf ) }    # Retrieves the end of detention date if available (P25)

?person wdt:P1 wd:Q2 . # Selects persons (P1 = Q2)

 ?person wdt:P4 wd:Q6 .                   # Filters to select women (P4 = female Q6)
 
 ?person p:P53 ?detention_statement .     # Searches for persons who were detained (P53)
 ?detention_statement ps:P53 ?detention .
          
 OPTIONAL { ?detention_statement pq:P23 ?startOfDetention. FILTER (datatype(?startOfDetention) = xsd:edtf ) } # Retrieves the start of detention date if available (P23)
 OPTIONAL { ?detention_statement pq:P25 ?endOfDetention. FILTER (datatype(?endOfDetention) = xsd:edtf ) }     # Retrieves the end of detention date if available (P25)