{
  "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": 86,
                "end": 88
              }
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 89,
                "end": 91
              }
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "o",
              "loc": {
                "sourceLocationType": "source",
                "start": 92,
                "end": 94
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 86,
              "end": 94
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 86,
          "end": 94
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 84,
      "end": 96
    }
  },
  "solutionModifiers": {},
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "pattern",
      "subType": "bind",
      "expression": {
        "type": "expression",
        "subType": "patternOperation",
        "operator": "exists",
        "args": {
          "type": "pattern",
          "subType": "group",
          "patterns": [
            {
              "type": "pattern",
              "subType": "group",
              "patterns": [
                {
                  "type": "query",
                  "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": 46,
                                "end": 48
                              }
                            },
                            "predicate": {
                              "type": "term",
                              "subType": "variable",
                              "value": "p",
                              "loc": {
                                "sourceLocationType": "source",
                                "start": 49,
                                "end": 51
                              }
                            },
                            "object": {
                              "type": "term",
                              "subType": "variable",
                              "value": "o",
                              "loc": {
                                "sourceLocationType": "source",
                                "start": 52,
                                "end": 54
                              }
                            },
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 46,
                              "end": 54
                            }
                          }
                        ],
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 46,
                          "end": 54
                        }
                      }
                    ],
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 44,
                      "end": 56
                    }
                  },
                  "datasets": {
                    "type": "datasetClauses",
                    "clauses": [],
                    "loc": {
                      "sourceLocationType": "noMaterialize"
                    }
                  },
                  "context": [],
                  "solutionModifiers": {},
                  "variables": [
                    {
                      "type": "pattern",
                      "subType": "bind",
                      "expression": {
                        "type": "expression",
                        "subType": "aggregate",
                        "aggregation": "count",
                        "distinct": false,
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 27,
                          "end": 36
                        },
                        "expression": [
                          {
                            "type": "term",
                            "subType": "variable",
                            "value": "o",
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 33,
                              "end": 35
                            }
                          }
                        ]
                      },
                      "variable": {
                        "type": "term",
                        "subType": "variable",
                        "value": "c",
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 40,
                          "end": 42
                        }
                      },
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 26,
                        "end": 43
                      }
                    }
                  ],
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 19,
                    "end": 56
                  }
                }
              ],
              "loc": {
                "sourceLocationType": "source",
                "start": 17,
                "end": 58
              }
            }
          ],
          "loc": {
            "sourceLocationType": "source",
            "start": 15,
            "end": 60
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 8,
          "end": 60
        }
      },
      "variable": {
        "type": "term",
        "subType": "variable",
        "value": "e",
        "loc": {
          "sourceLocationType": "source",
          "start": 64,
          "end": 66
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 7,
        "end": 67
      }
    },
    {
      "type": "pattern",
      "subType": "bind",
      "expression": {
        "type": "expression",
        "subType": "aggregate",
        "aggregation": "sum",
        "distinct": false,
        "loc": {
          "sourceLocationType": "source",
          "start": 69,
          "end": 76
        },
        "expression": [
          {
            "type": "term",
            "subType": "variable",
            "value": "o",
            "loc": {
              "sourceLocationType": "source",
              "start": 73,
              "end": 75
            }
          }
        ]
      },
      "variable": {
        "type": "term",
        "subType": "variable",
        "value": "t",
        "loc": {
          "sourceLocationType": "source",
          "start": 80,
          "end": 82
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 68,
        "end": 83
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "SELECT (EXISTS { { SELECT (COUNT(?o) AS ?c) { ?s ?p ?o } } } AS ?e) (SUM(?o) AS ?t) { ?s ?p ?o }\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 96
    },
    "startOnNew": 0,
    "endOnNew": 96
  },
  "type": "query"
}
