{
  "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": 18,
                "end": 20
              }
            },
            "predicate": {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 21,
                "end": 23
              }
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "o",
              "loc": {
                "sourceLocationType": "source",
                "start": 24,
                "end": 26
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 18,
              "end": 26
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 18,
          "end": 26
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 16,
      "end": 28
    }
  },
  "solutionModifiers": {
    "order": {
      "type": "solutionModifier",
      "subType": "order",
      "orderDefs": [
        {
          "expression": {
            "type": "expression",
            "subType": "patternOperation",
            "operator": "notexists",
            "args": {
              "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": 84,
                                "end": 86
                              }
                            },
                            "predicate": {
                              "type": "term",
                              "subType": "variable",
                              "value": "q",
                              "loc": {
                                "sourceLocationType": "source",
                                "start": 87,
                                "end": 89
                              }
                            },
                            "object": {
                              "type": "term",
                              "subType": "variable",
                              "value": "x",
                              "loc": {
                                "sourceLocationType": "source",
                                "start": 90,
                                "end": 92
                              }
                            },
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 84,
                              "end": 92
                            }
                          }
                        ],
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 84,
                          "end": 92
                        }
                      }
                    ],
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 82,
                      "end": 94
                    }
                  },
                  "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": 60,
                          "end": 68
                        },
                        "expression": [
                          {
                            "type": "wildcard",
                            "loc": {
                              "sourceLocationType": "source",
                              "start": 66,
                              "end": 67
                            }
                          }
                        ]
                      },
                      "variable": {
                        "type": "term",
                        "subType": "variable",
                        "value": "c",
                        "loc": {
                          "sourceLocationType": "source",
                          "start": 72,
                          "end": 74
                        }
                      },
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 59,
                        "end": 75
                      }
                    }
                  ],
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 52,
                    "end": 94
                  }
                }
              ],
              "loc": {
                "sourceLocationType": "source",
                "start": 50,
                "end": 96
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 38,
              "end": 97
            }
          },
          "descending": false,
          "loc": {
            "sourceLocationType": "source",
            "start": 38,
            "end": 97
          }
        }
      ],
      "loc": {
        "sourceLocationType": "source",
        "start": 29,
        "end": 97
      }
    }
  },
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "term",
      "subType": "variable",
      "value": "s",
      "loc": {
        "sourceLocationType": "source",
        "start": 7,
        "end": 9
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "SELECT ?s WHERE { ?s ?p ?o } ORDER BY (NOT EXISTS { SELECT (COUNT(*) AS ?c) WHERE { ?s ?q ?x } })\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 97
    },
    "startOnNew": 0,
    "endOnNew": 97
  },
  "type": "query"
}
