# Sub query

Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, and document use rules apply.

## Abstract

This page describes W3C SPARQL Working Group's SPARQL 1.1 test suite.

### Contributing Tests

The test manifests and entries are built automatically from manifest.ttl using a Rake task. Tests may be contributed via pull request to https://github.com/w3c/rdf-tests with suitable changes to the manifest.ttl and referenced files.

### Distribution

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License. To contribute to a W3C Test Suite, see the policies and contribution forms.

### Disclaimer

UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

## Test Descriptions

subquery01: sq01 - Subquery within graph pattern
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq01.srx
subquery02: sq02 - Subquery within graph pattern, graph variable is bound
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq02.srx
subquery03: sq03 - Subquery within graph pattern, graph variable is not bound
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq03.srx
subquery04: sq04 - Subquery within graph pattern, default graph does not apply
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq04.srx
subquery05: sq05 - Subquery within graph pattern, from named applies
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq05.srx
subquery06: sq06 - Subquery with graph pattern, from named applies
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq06.srx
subquery07: sq07 - Subquery with from
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq07.srx
subquery08: sq08 - Subquery with aggregate
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq08.srx
subquery09: sq09 - Nested Subqueries
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq09.srx
subquery10: sq10 - Subquery with exists
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq10.srx
subquery11: sq11 - Subquery limit per resource

  This query limits results per number of orders, rather than by number of rows

  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq11.srx
subquery12: sq12 - Subquery in CONSTRUCT with built-ins

  This query constructs full names from first and last names

  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq12_out.ttl
subquery13: sq13 - Subqueries don't inject bindings

  The result of this subquery is a Kartesian product of all orders, rather than paris of orders sharing products, since subqueries are evaluated independent from bindings from outside the subquery

  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq13.srx
subquery14: sq14 - limit by resource
  type
    mf:QueryEvaluationTest
  approval
  action
  result
    sq14-out.ttl