{
  "context": [],
  "subType": "select",
  "where": {
    "type": "pattern",
    "subType": "group",
    "patterns": [
      {
        "type": "pattern",
        "subType": "bgp",
        "triples": [
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "s",
              "loc": {
                "sourceLocationType": "source",
                "start": 37,
                "end": 39
              }
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 40,
                "end": 42
              }
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "o",
              "loc": {
                "sourceLocationType": "source",
                "start": 43,
                "end": 45
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 37,
              "end": 45
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 37,
          "end": 45
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 35,
      "end": 47
    }
  },
  "solutionModifiers": {},
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "pattern",
      "subType": "bind",
      "expression": {
        "type": "expression",
        "subType": "operation",
        "operator": "+",
        "args": [
          {
            "type": "expression",
            "subType": "aggregate",
            "aggregation": "count",
            "distinct": false,
            "loc": {
              "sourceLocationType": "source",
              "start": 8,
              "end": 17
            },
            "expression": [
              {
                "type": "term",
                "subType": "variable",
                "value": "o",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 14,
                  "end": 16
                }
              }
            ]
          },
          {
            "type": "term",
            "subType": "literal",
            "value": "1",
            "langOrIri": {
              "type": "term",
              "subType": "namedNode",
              "value": "http://www.w3.org/2001/XMLSchema#integer",
              "loc": {
                "sourceLocationType": "noMaterialize"
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 20,
              "end": 21
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 8,
          "end": 21
        }
      },
      "variable": {
        "type": "term",
        "subType": "variable",
        "value": "x",
        "loc": {
          "sourceLocationType": "source",
          "start": 25,
          "end": 27
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 7,
        "end": 28
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "SELECT (COUNT(?o) + 1 AS ?x) WHERE { ?s ?p ?o }\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 47
    },
    "startOnNew": 0,
    "endOnNew": 47
  },
  "type": "query"
}
