{
  "context": [
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "dc",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://purl.org/dc/elements/1.1/",
        "loc": {
          "sourceLocationType": "source",
          "start": 13,
          "end": 47
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 0,
        "end": 47
      }
    },
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "ns",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://example.org/ns#",
        "loc": {
          "sourceLocationType": "source",
          "start": 61,
          "end": 85
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 48,
        "end": 85
      }
    }
  ],
  "subType": "select",
  "where": {
    "type": "pattern",
    "subType": "group",
    "patterns": [
      {
        "type": "pattern",
        "subType": "bgp",
        "triples": [
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "x",
              "loc": {
                "sourceLocationType": "source",
                "start": 112,
                "end": 114
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "price",
              "loc": {
                "sourceLocationType": "source",
                "start": 115,
                "end": 123
              },
              "prefix": "ns"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 124,
                "end": 126
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 112,
              "end": 126
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "x",
              "loc": {
                "sourceLocationType": "source",
                "start": 132,
                "end": 134
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "discount",
              "loc": {
                "sourceLocationType": "source",
                "start": 135,
                "end": 146
              },
              "prefix": "ns"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "discount",
              "loc": {
                "sourceLocationType": "source",
                "start": 147,
                "end": 156
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 132,
              "end": 156
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 112,
          "end": 128
        }
      },
      {
        "type": "pattern",
        "subType": "bind",
        "expression": {
          "type": "expression",
          "subType": "operation",
          "operator": "*",
          "args": [
            {
              "type": "term",
              "subType": "variable",
              "value": "p",
              "loc": {
                "sourceLocationType": "source",
                "start": 166,
                "end": 168
              }
            },
            {
              "type": "expression",
              "subType": "operation",
              "operator": "-",
              "args": [
                {
                  "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": 170,
                    "end": 171
                  }
                },
                {
                  "type": "term",
                  "subType": "variable",
                  "value": "discount",
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 172,
                    "end": 181
                  }
                }
              ],
              "loc": {
                "sourceLocationType": "source",
                "start": 169,
                "end": 182
              }
            }
          ],
          "loc": {
            "sourceLocationType": "source",
            "start": 166,
            "end": 182
          }
        },
        "variable": {
          "type": "term",
          "subType": "variable",
          "value": "price",
          "loc": {
            "sourceLocationType": "source",
            "start": 186,
            "end": 192
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 160,
          "end": 193
        }
      },
      {
        "type": "pattern",
        "subType": "filter",
        "expression": {
          "type": "expression",
          "subType": "operation",
          "operator": "<",
          "args": [
            {
              "type": "term",
              "subType": "variable",
              "value": "price",
              "loc": {
                "sourceLocationType": "source",
                "start": 204,
                "end": 210
              }
            },
            {
              "type": "term",
              "subType": "literal",
              "value": "20",
              "langOrIri": {
                "type": "term",
                "subType": "namedNode",
                "value": "http://www.w3.org/2001/XMLSchema#integer",
                "loc": {
                  "sourceLocationType": "noMaterialize"
                }
              },
              "loc": {
                "sourceLocationType": "source",
                "start": 213,
                "end": 215
              }
            }
          ],
          "loc": {
            "sourceLocationType": "source",
            "start": 203,
            "end": 216
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 197,
          "end": 216
        }
      },
      {
        "type": "pattern",
        "subType": "bgp",
        "triples": [
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "x",
              "loc": {
                "sourceLocationType": "source",
                "start": 220,
                "end": 222
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "title",
              "loc": {
                "sourceLocationType": "source",
                "start": 223,
                "end": 231
              },
              "prefix": "dc"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "title",
              "loc": {
                "sourceLocationType": "source",
                "start": 232,
                "end": 238
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 220,
              "end": 238
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 220,
          "end": 240
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 109,
      "end": 243
    }
  },
  "solutionModifiers": {},
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "term",
      "subType": "variable",
      "value": "title",
      "loc": {
        "sourceLocationType": "source",
        "start": 95,
        "end": 101
      }
    },
    {
      "type": "term",
      "subType": "variable",
      "value": "price",
      "loc": {
        "sourceLocationType": "source",
        "start": 102,
        "end": 108
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "PREFIX  dc:  <http://purl.org/dc/elements/1.1/>\nPREFIX  ns:  <http://example.org/ns#>\n\nSELECT  ?title ?price\n{  ?x ns:price ?p .\n   ?x ns:discount ?discount\n   BIND (?p*(1-?discount) AS ?price)\n   FILTER(?price < 20)\n   ?x dc:title ?title . \n}\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 243
    },
    "startOnNew": 0,
    "endOnNew": 243
  },
  "type": "query"
}
