{ "type": "statement", "variant": "list", "statement": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "not" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ] } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "not" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ] } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "not" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ] } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "~" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "~" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "~" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.d" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "literal", "variant": "decimal", "value": "11" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] } } ] } }, "operator": "-" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "exists" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.d" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "literal", "variant": "decimal", "value": "11" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] } } ] } }, "operator": "-" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "exists" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "operator": "-" } }, "operator": "not" } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "operator": "-" } }, "operator": "not" } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } }, "operator": "not" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "13" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } }, "operator": "not" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "13" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } }, "operator": "not" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "13" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "-" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "~" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "operator": "~" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.e" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } ] } } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "~" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "operator": "~" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.e" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } ] } } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "~" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "~" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "operator": "~" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.e" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } ] } } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "a" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } }, "operator": "+" }, "operator": "~" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.d" }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "a" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } }, "operator": "+" }, "operator": "~" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.d" }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "a" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } }, "operator": "+" }, "operator": "~" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "left": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.d" }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "not" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "exists" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "consequent": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } ] } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" } } ] }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "not" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "exists" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "consequent": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } ] } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" } } ] }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ] } } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ] } } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "filter": "distinct" } } ] } }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } ], "filter": "distinct" } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "+" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "~" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "filter": "distinct" } } ] } }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } ], "filter": "distinct" } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "+" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "~" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } }, "operator": "~" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } }, "operator": "~" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } }, "operator": "~" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "literal", "variant": "decimal", "value": "11" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "operator": "not" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "c" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "+" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "filter": "distinct" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "operator": "-" }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "exists" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "literal", "variant": "decimal", "value": "11" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "operator": "not" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "c" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "+" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "filter": "distinct" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "operator": "-" }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "exists" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "b" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, "operator": "exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } }, "operator": "-" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, "operator": "~" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "b" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, "operator": "exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } }, "operator": "-" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, "operator": "~" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "operator": "not" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "b" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, "operator": "exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] } }, "operator": "-" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "f" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, "operator": "~" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "operator": "not" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "filter": "distinct" } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "filter": "distinct" } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "-13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ] } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "-13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ] } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "-13" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ] } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "+" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } } ] }, "operator": "exists" }, "consequent": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "not" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "+" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } } ] }, "operator": "exists" }, "consequent": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "not" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "not exists" } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "+" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } } ] }, "operator": "exists" }, "consequent": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } }, "operator": "~" }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "not" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "operator": "~" } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "~" } }, "operator": "+" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "+" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "operator": "~" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "+" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "operator": "~" } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "~" } }, "operator": "+" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "+" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "operator": "~" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "+" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "operator": "~" } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "~" } }, "operator": "+" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "+" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "d" }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "operator": "~" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "+" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "literal", "variant": "decimal", "value": "19" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "+" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } ] } } } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "literal", "variant": "decimal", "value": "19" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "+" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } ] } } } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "f" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "~" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "literal", "variant": "decimal", "value": "19" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } } } ] }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "+" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } ] } } } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.c" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "not" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } } } ] }, "operator": "not exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.c" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "identifier", "variant": "column", "name": "f" } ] } }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "not" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } } } ] }, "operator": "not exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ], "filter": "distinct" } } } ] } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "filter": "distinct" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ], "filter": "distinct" } } } ] } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "filter": "distinct" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ], "filter": "distinct" } } } ] } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } } ] } }, "operator": "~" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "filter": "distinct" } }, "operator": "+" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "e" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "13" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "f" } }, "operator": "-" } }, "operator": "+" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "+11" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "~" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "operator": "+" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] } } }, "operator": "not" } ] }, "operator": "exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "not exists" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "13" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "f" } }, "operator": "-" } }, "operator": "+" } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "+11" }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "~" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "operator": "+" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] } } }, "operator": "not" } ] }, "operator": "exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "f" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "not exists" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "exists" } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.d" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "exists" } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.d" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "exists" } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ] } }, "right": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "operator": "-" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "identifier", "variant": "column", "name": "a" } ] } } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "identifier", "variant": "column", "name": "t1.d" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "not" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] } } } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "d" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "operator": "exists" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "not" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ] } } } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "d" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "identifier", "variant": "column", "name": "d" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "identifier", "variant": "column", "name": "f" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "operator": "exists" }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "a" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "operator": "-" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "+" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "operator": "-" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "+" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" }, { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } }, "operator": "-" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } }, "operator": "-" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } }, { "type": "literal", "variant": "decimal", "value": "13" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "identifier", "variant": "column", "name": "d" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" } } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "+" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] } } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "~" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "~" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ] } } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } ] } } } ] }, "operator": "exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "a" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "~" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "~" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ] } } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "operator": "-" }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "-" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "-" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "filter": "distinct" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "e" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "filter": "distinct" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "e" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ], "filter": "distinct" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "filter": "distinct" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ], "filter": "distinct" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } } } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "e" }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "-" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } } ] }, "operator": "exists" } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } ] } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, "operator": "exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } } ] }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, "operator": "not exists" }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.a" } ] } }, "operator": "~" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "19" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "17" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.f" }, "operator": "-" } } ] }, "operator": "-" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ] } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "literal", "variant": "decimal", "value": "19" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "17" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } } } ] }, "operator": "not exists" }, "consequent": { "type": "literal", "variant": "decimal", "value": "11" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "d" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "19" }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "~" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, "operator": "not exists" }, "operator": "not" } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "+" } }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "+" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "b" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "11" } } ] } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] }, "operator": "not exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "19" }, "consequent": { "type": "identifier", "variant": "column", "name": "c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "~" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ] }, "operator": "not exists" }, "operator": "not" } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "+" } }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "+" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "b" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "c" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "operator": "+" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ], "discriminant": { "type": "literal", "variant": "decimal", "value": "11" } } ] } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "e" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" } } ] }, "operator": "not exists" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "17" } } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "operator": "-" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "operator": "-" } }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "+" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "operator": "-" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "operator": "-" } }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "+" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "identifier", "variant": "column", "name": "f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ] }, "operator": "-" } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "a" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.d" }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "e" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } }, "operator": "-" } }, "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "literal", "variant": "decimal", "value": "17" }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "11" }, "operator": "+" } } }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "-" } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.e" }, { "type": "identifier", "variant": "column", "name": "f" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "b" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "+" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "e" }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] }, "left": { "type": "identifier", "variant": "column", "name": "e" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.c" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "operator": "not" }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.c" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "operator": "not" }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.c" }, "consequent": { "type": "identifier", "variant": "column", "name": "a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.e" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "13" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "-" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "c" }, "operator": "-" } ], "filter": "distinct" } }, "operator": "-" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "d" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "operator": "~" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.e" }, "operator": "-" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "literal", "variant": "decimal", "value": "17" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.a" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "d" } } }, "operator": "not" }, "consequent": { "type": "identifier", "variant": "column", "name": "e" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "b" } } ] } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, { "type": "literal", "variant": "decimal", "value": "11" } ] } } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.d" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.f" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.f" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.f" }, "consequent": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "17" } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ], "discriminant": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "-" } } } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "c" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.c" } } } } ] }, { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "c" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "c" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "e" }, "right": { "type": "identifier", "variant": "column", "name": "t1.c" } } ], "filter": "distinct" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" } ], "filter": "distinct" } }, "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ], "filter": "distinct" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } } } ] }, "operator": "not exists" }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "f" }, { "type": "identifier", "variant": "column", "name": "c" }, { "type": "identifier", "variant": "column", "name": "c" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "13" } }, "consequent": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "11" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } } ], "discriminant": { "type": "identifier", "variant": "column", "name": "t1.c" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "13" } } ] } }, { "type": "condition", "variant": "else", "consequent": { "type": "literal", "variant": "decimal", "value": "19" } } ] }, "right": { "type": "literal", "variant": "decimal", "value": "17" } } ] }, { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "c" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.b" } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "literal", "variant": "decimal", "value": "11" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "left": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "e" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, "operator": "-" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "+" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } }, "operator": "~" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } } } }, "operator": "-" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } }, "operator": "-" } } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "13" }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "b" } } } ] }, "operator": "not exists" } ] }, { "type": "identifier", "variant": "column", "name": "t1.d" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } } ] } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "d" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "|", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "d" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "&", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" }, { "type": "identifier", "variant": "column", "name": "t1.f" }, { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "19" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "left": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "expression", "format": "unary", "variant": "exists", "expression": { "type": "statement", "variant": "select", "result": [ { "type": "literal", "variant": "decimal", "value": "1" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "or", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "identifier", "variant": "column", "name": "t1.b" }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "a" }, "operator": "-" } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "/", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "t1.b" }, "right": { "type": "identifier", "variant": "column", "name": "t1.a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } ] } }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "abs" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } } } }, "right": { "type": "literal", "variant": "decimal", "value": "11" } }, "consequent": { "type": "literal", "variant": "decimal", "value": "13" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "a" } } ] }, "right": { "type": "identifier", "variant": "column", "name": "t1.f" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "not in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "b" }, { "type": "identifier", "variant": "column", "name": "t1.b" }, { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "literal", "variant": "decimal", "value": "19" }, "operator": "-" } ] }, "left": { "type": "literal", "variant": "decimal", "value": "19" } } }, "consequent": { "type": "identifier", "variant": "column", "name": "b" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "-" }, "right": { "type": "identifier", "variant": "column", "name": "e" } } ] }, "operator": "not exists" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "c" } } ] }, "operator": "+" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } }, "right": { "type": "identifier", "variant": "column", "name": "f" } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "13" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.e" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.c" }, "operator": "~" }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "literal", "variant": "decimal", "value": "17" }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.d" } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "d" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "not between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "between", "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "d" } }, "left": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "a" }, { "type": "literal", "variant": "decimal", "value": "11" }, { "type": "identifier", "variant": "column", "name": "d" } ] }, "left": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "identifier", "variant": "column", "name": "c" } } } ] }, { "type": "identifier", "variant": "column", "name": "c" } ] } }, "operator": "-" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.e" } ] } } }, "left": { "type": "literal", "variant": "decimal", "value": "11" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.f" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "identifier", "variant": "column", "name": "a" } } ] }, { "type": "identifier", "variant": "column", "name": "t1.a" } ] } } } } }, "right": { "type": "identifier", "variant": "column", "name": "b" } }, "right": { "type": "identifier", "variant": "column", "name": "c" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": ">=", "left": { "type": "identifier", "variant": "column", "name": "a" }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.a" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "f" } } ] }, { "type": "identifier", "variant": "column", "name": "b" } ] }, "left": { "type": "identifier", "variant": "column", "name": "a" } }, "operator": "not" } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "~" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "~" } } ] }, { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "coalesce" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "statement", "variant": "select", "result": [ { "type": "identifier", "variant": "column", "name": "t1.b" } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "and", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" }, { "type": "literal", "variant": "decimal", "value": "19" }, { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "in", "right": { "type": "statement", "variant": "compound", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "11" } ], "filter": "distinct" } }, "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "e" } ] } } }, { "type": "condition", "variant": "else", "consequent": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.c" } ] } } } ], "discriminant": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "expression", "format": "binary", "variant": "operation", "operation": "-", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "b" }, "right": { "type": "literal", "variant": "decimal", "value": "17" } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "d" }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.d" } } } ] } }, "right": { "type": "expression", "variant": "case", "expression": [ { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "t1.f" } ] } }, "operator": "~" }, "consequent": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "count" }, "args": { "type": "identifier", "variant": "star", "name": "*" } }, "operator": "+" } }, { "type": "condition", "variant": "else", "consequent": { "type": "expression", "format": "unary", "variant": "cast", "expression": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "avg" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "13" } ] } }, "as": { "type": "datatype", "variant": "integer", "affinity": "integer" } } } ], "discriminant": { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "max" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "literal", "variant": "decimal", "value": "19" } ] } } } } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } }, "compound": [ { "type": "compound", "variant": "union", "statement": { "type": "statement", "variant": "select", "result": [ { "type": "function", "name": { "type": "identifier", "variant": "function", "name": "min" }, "args": { "type": "expression", "variant": "list", "expression": [ { "type": "identifier", "variant": "column", "name": "d" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" } } } ] }, "left": { "type": "literal", "variant": "decimal", "value": "17" } }, "consequent": { "type": "expression", "format": "binary", "variant": "operation", "operation": "*", "left": { "type": "identifier", "variant": "column", "name": "t1.a" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.a" }, "operator": "-" } } }, { "type": "condition", "variant": "when", "condition": { "type": "expression", "format": "binary", "variant": "operation", "operation": "=", "left": { "type": "identifier", "variant": "column", "name": "t1.c" }, "right": { "type": "literal", "variant": "decimal", "value": "19" } }, "consequent": { "type": "identifier", "variant": "column", "name": "t1.c" } }, { "type": "condition", "variant": "else", "consequent": { "type": "identifier", "variant": "column", "name": "t1.f" } } ] } ] }, "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "expression", "format": "binary", "variant": "operation", "operation": "+", "left": { "type": "literal", "variant": "decimal", "value": "17" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } }, "right": { "type": "identifier", "variant": "column", "name": "t1.b" } } }, "right": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<=", "left": { "type": "identifier", "variant": "column", "name": "t1.f" }, "right": { "type": "literal", "variant": "decimal", "value": "13" } } } ] }, { "type": "literal", "variant": "decimal", "value": "17" } ] } } ], "from": { "type": "identifier", "variant": "table", "name": "t1" }, "where": [ { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "expression", "format": "binary", "variant": "operation", "operation": "<>", "left": { "type": "identifier", "variant": "column", "name": "t1.e" }, "right": { "type": "expression", "format": "unary", "variant": "operation", "expression": { "type": "identifier", "variant": "column", "name": "t1.b" }, "operator": "~" } }, "operator": "not" } ] } ] }