Triply Academy

academyCreated on Sep 12th, 2018
Members
Created 15 days ago, 2 versions
Created 2 months ago, 1 version

Aggregate functions can be nested, e.g., to calculate the maximum count.

Created 2 months ago, 1 version

Purpose

For grouping it is necessary to include the grouped by variables in the projection. If such a variable is not wanted in the outer projection, this can be solved with a sub-select. The only purpose of the outer select is to curate the variables that are supposed to be returned.

Created 3 months ago, 1 version

HTML templating

Use {{variable}} notation in order to include string representations of bindings into HTML strings. This allows human-readable HTML content to be generated from within a SPARQL query. (This is a Triple-specific feature.)

Notice that the HTML string is itself semantically described as a literal with datatype IRI rdf:HTML.

You can press the "Gallery" result set view in order to display a gallery view of the returned HTML widgets. The gallery widget requires that the HTML strings are bound to variable ?widget.

Created 3 months ago, 1 version

Binding a variable

The bind keyword allows variables to be introduced that do not appear in a graph pattern.

Created 3 months ago, 1 version

A table of Pokémon and their color

A simple select query that returns Pokémon (bindings for the variable ?pokemon) and their colors (bindings for the variable ?color), in that order.

Notice how the predicate term (i.e., the middle term) is bound to a specific IRI (<https://triplydb.com/academy/pokemon/vocab/colour>) that denotes the relationship between things and their depiction.

Created 3 months ago, 1 version

The first select query

This is a very simple select query. But it already contains all three main select query components:

  1. Projection: the columns that are returned (select ?s ?p ?o)
  2. Triple Pattern: how the cells will be filled based on graph matching (?s ?p ?o.)
  3. Result set modifiers: adaptations to the result table (limit)
Created 3 months ago, 1 version
Created 5 months ago, 2 versions
Created 5 months ago, 1 version
Created 6 months ago, 2 versions
Created 6 months ago, 2 versions
Created 6 months ago, 1 version
Created 6 months ago, 2 versions
Created 6 months ago, 1 version
Created 6 months ago, 1 version
Created 6 months ago, 4 versions
Created 6 months ago, 1 version

This query is used in our documentation.

Created 9 months ago, no versions
Created a year ago, 4 versions
Created a year ago, 2 versions
Created a year ago, 2 versions
Created a year ago, 1 version
Created a year ago, 3 versions
Created a year ago, 3 versions
Created a year ago, 1 version

Schema.org allows us to store the same audio fragment in multiple formats. HTML templating allows us to generate an HTML5 <audio> element that includes multiple <source> tags.

Created a year ago, 3 versions

This query shows how HTML literals can be returned by a SPARQL query.

Since the creation of complex HTML literals can be rather cumbersome, the query can be rewritten into this query that uses Triply Templates for simplification.

Created a year ago, 4 versions

Query that shows how Triply Templating can be used to simplify SPARQL queries with complex literals. This is specifically useful for SPARQL queries that return HTML literals, which can be rather complex.

This query is a simplified version of this query that does not use Triply Templating.

Created a year ago, 4 versions

An ASK query returns whether a specific fact is true or false. In this case, the fact is "Mew weights 50 kilograms." This fact is false (the actual weight is 40 kilograms.)

Created 2 years ago, 7 versions