{
  "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": 77,
                "end": 79
              }
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 80,
                "end": 82
              }
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "o",
              "loc": {
                "sourceLocationType": "source",
                "start": 83,
                "end": 85
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 77,
              "end": 85
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 77,
          "end": 85
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 75,
      "end": 87
    }
  },
  "solutionModifiers": {},
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "pattern",
      "subType": "bind",
      "expression": {
        "type": "expression",
        "subType": "aggregate",
        "aggregation": "count",
        "distinct": false,
        "loc": {
          "sourceLocationType": "source",
          "start": 8,
          "end": 67
        },
        "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": 52,
                                    "end": 54
                                  }
                                },
                                "predicate": {
                                  "type": "term",
                                  "subType": "variable",
                                  "value": "p",
                                  "loc": {
                                    "sourceLocationType": "source",
                                    "start": 55,
                                    "end": 57
                                  }
                                },
                                "object": {
                                  "type": "term",
                                  "subType": "variable",
                                  "value": "o",
                                  "loc": {
                                    "sourceLocationType": "source",
                                    "start": 58,
                                    "end": 60
                                  }
                                },
                                "loc": {
                                  "sourceLocationType": "source",
                                  "start": 52,
                                  "end": 60
                                }
                              }
                            ],
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 52,
                              "end": 60
                            }
                          }
                        ],
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 50,
                          "end": 62
                        }
                      },
                      "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": 33,
                              "end": 42
                            },
                            "expression": [
                              {
                                "type": "term",
                                "subType": "variable",
                                "value": "o",
                                "loc": {
                                  "sourceLocationType": "source",
                                  "start": 39,
                                  "end": 41
                                }
                              }
                            ]
                          },
                          "variable": {
                            "type": "term",
                            "subType": "variable",
                            "value": "c",
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 46,
                              "end": 48
                            }
                          },
                          "loc": {
                            "sourceLocationType": "source",
                            "start": 32,
                            "end": 49
                          }
                        }
                      ],
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 25,
                        "end": 62
                      }
                    }
                  ],
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 23,
                    "end": 64
                  }
                }
              ],
              "loc": {
                "sourceLocationType": "source",
                "start": 21,
                "end": 66
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 14,
              "end": 66
            }
          }
        ]
      },
      "variable": {
        "type": "term",
        "subType": "variable",
        "value": "n",
        "loc": {
          "sourceLocationType": "source",
          "start": 71,
          "end": 73
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 7,
        "end": 74
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "SELECT (COUNT(EXISTS { { SELECT (COUNT(?o) AS ?c) { ?s ?p ?o } } }) AS ?n) { ?s ?p ?o }\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 87
    },
    "startOnNew": 0,
    "endOnNew": 87
  },
  "type": "query"
}
