model
Select
column
from
where
union
Column
name
columnalias
From
table
Table
name
tablealias
Where
condition
BooleanOperation
condition
ComparisonOperator
Union
select
Equals
GreaterThan
LessThan
NotEquals
And
Or
ColumnAlias
name
TableAlias
name
Condition
booleanoperation
Comparison
lhs
rhs
comparisonoperator
Existence
select
Exists
NotExists
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.example.org/model" nsPrefix="model">
  <eClassifiers xsi:type="ecore:EClass" name="Select">
    <eStructuralFeatures xsi:type="ecore:EReference" name="column" lowerBound="1"
        upperBound="-1" eType="#//Column" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="from" lowerBound="1" eType="#//From"
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="where" eType="#//Where"
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="union" eType="#//Union"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Column">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="columnalias" eType="#//ColumnAlias"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="From">
    <eStructuralFeatures xsi:type="ecore:EReference" name="table" lowerBound="1" upperBound="-1"
        eType="#//Table" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Table">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="tablealias" eType="#//TableAlias"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Where">
    <eStructuralFeatures xsi:type="ecore:EReference" name="condition" lowerBound="1"
        eType="#//Condition" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="BooleanOperation" abstract="true" interface="true">
    <eStructuralFeatures xsi:type="ecore:EReference" name="condition" lowerBound="1"
        eType="#//Condition" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ComparisonOperator" abstract="true"
      interface="true"/>
  <eClassifiers xsi:type="ecore:EClass" name="Union">
    <eStructuralFeatures xsi:type="ecore:EReference" name="select" lowerBound="1"
        eType="#//Select" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Equals" eSuperTypes="#//ComparisonOperator"/>
  <eClassifiers xsi:type="ecore:EClass" name="GreaterThan" eSuperTypes="#//ComparisonOperator"/>
  <eClassifiers xsi:type="ecore:EClass" name="LessThan" eSuperTypes="#//ComparisonOperator"/>
  <eClassifiers xsi:type="ecore:EClass" name="NotEquals" eSuperTypes="#//ComparisonOperator"/>
  <eClassifiers xsi:type="ecore:EClass" name="And" eSuperTypes="#//BooleanOperation"/>
  <eClassifiers xsi:type="ecore:EClass" name="Or" eSuperTypes="#//BooleanOperation"/>
  <eClassifiers xsi:type="ecore:EClass" name="ColumnAlias">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="TableAlias">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Condition" abstract="true" interface="true">
    <eStructuralFeatures xsi:type="ecore:EReference" name="booleanoperation" eType="#//BooleanOperation"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Comparison" eSuperTypes="#//Condition">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="lhs" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="rhs" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="comparisonoperator" lowerBound="1"
        eType="#//ComparisonOperator" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Existence" abstract="true" interface="true"
      eSuperTypes="#//Condition">
    <eStructuralFeatures xsi:type="ecore:EReference" name="select" lowerBound="1"
        eType="#//Select" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Exists" eSuperTypes="#//Existence"/>
  <eClassifiers xsi:type="ecore:EClass" name="NotExists" eSuperTypes="#//Existence"/>
</ecore:EPackage>

{"directed":true,"nodes":[{"nsPrefix":"model","nsURI":"http://www.example.org/model","name":"model","id":0,"eClass":"EPackage"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Select","instanceClass":null,"abstract":false,"id":1,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Column","instanceClass":null,"abstract":false,"id":2,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"From","instanceClass":null,"abstract":false,"id":3,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Table","instanceClass":null,"abstract":false,"id":4,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Where","instanceClass":null,"abstract":false,"id":5,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"BooleanOperation","instanceClass":null,"abstract":true,"id":6,"interface":true,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"ComparisonOperator","instanceClass":null,"abstract":true,"id":7,"interface":true,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Union","instanceClass":null,"abstract":false,"id":8,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Equals","instanceClass":null,"abstract":false,"id":9,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"GreaterThan","instanceClass":null,"abstract":false,"id":10,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"LessThan","instanceClass":null,"abstract":false,"id":11,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"NotEquals","instanceClass":null,"abstract":false,"id":12,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"And","instanceClass":null,"abstract":false,"id":13,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Or","instanceClass":null,"abstract":false,"id":14,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"ColumnAlias","instanceClass":null,"abstract":false,"id":15,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"TableAlias","instanceClass":null,"abstract":false,"id":16,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Condition","instanceClass":null,"abstract":true,"id":17,"interface":true,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Comparison","instanceClass":null,"abstract":false,"id":18,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Existence","instanceClass":null,"abstract":true,"id":19,"interface":true,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Exists","instanceClass":null,"abstract":false,"id":20,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"NotExists","instanceClass":null,"abstract":false,"id":21,"interface":false,"eClass":"EClass"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"column","changeable":true,"resolveProxies":true,"lowerBound":1,"id":22,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"from","changeable":true,"resolveProxies":true,"lowerBound":1,"id":23,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"where","changeable":true,"resolveProxies":true,"lowerBound":0,"id":24,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"union","changeable":true,"resolveProxies":true,"lowerBound":0,"id":25,"derived":false},{"id":26,"eClass":"EGenericType"},{"id":27,"eClass":"EGenericType"},{"id":28,"eClass":"EGenericType"},{"id":29,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":1,"iD":false,"id":30,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"columnalias","changeable":true,"resolveProxies":true,"lowerBound":0,"id":31,"derived":false},{"id":32,"eClass":"EGenericType"},{"id":33,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"table","changeable":true,"resolveProxies":true,"lowerBound":1,"id":34,"derived":false},{"id":35,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":1,"iD":false,"id":36,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"tablealias","changeable":true,"resolveProxies":true,"lowerBound":0,"id":37,"derived":false},{"id":38,"eClass":"EGenericType"},{"id":39,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"condition","changeable":true,"resolveProxies":true,"lowerBound":1,"id":40,"derived":false},{"id":41,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"condition","changeable":true,"resolveProxies":true,"lowerBound":1,"id":42,"derived":false},{"id":43,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"select","changeable":true,"resolveProxies":true,"lowerBound":1,"id":44,"derived":false},{"id":45,"eClass":"EGenericType"},{"id":46,"eClass":"EGenericType"},{"id":47,"eClass":"EGenericType"},{"id":48,"eClass":"EGenericType"},{"id":49,"eClass":"EGenericType"},{"id":50,"eClass":"EGenericType"},{"id":51,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":1,"iD":false,"id":52,"derived":false},{"id":53,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":1,"iD":false,"id":54,"derived":false},{"id":55,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"booleanoperation","changeable":true,"resolveProxies":true,"lowerBound":0,"id":56,"derived":false},{"id":57,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"lhs","changeable":true,"lowerBound":1,"iD":false,"id":58,"derived":false},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"rhs","changeable":true,"lowerBound":1,"iD":false,"id":59,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"comparisonoperator","changeable":true,"resolveProxies":true,"lowerBound":1,"id":60,"derived":false},{"id":61,"eClass":"EGenericType"},{"id":62,"eClass":"EGenericType"},{"id":63,"eClass":"EGenericType"},{"id":64,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"select","changeable":true,"resolveProxies":true,"lowerBound":1,"id":65,"derived":false},{"id":66,"eClass":"EGenericType"},{"id":67,"eClass":"EGenericType"},{"id":68,"eClass":"EGenericType"},{"id":69,"eClass":"EGenericType"}],"links":[{"source":0,"target":1},{"source":0,"target":2},{"source":0,"target":3},{"source":0,"target":4},{"source":0,"target":5},{"source":0,"target":6},{"source":0,"target":7},{"source":0,"target":8},{"source":0,"target":9},{"source":0,"target":10},{"source":0,"target":11},{"source":0,"target":12},{"source":0,"target":13},{"source":0,"target":14},{"source":0,"target":15},{"source":0,"target":16},{"source":0,"target":17},{"source":0,"target":18},{"source":0,"target":19},{"source":0,"target":20},{"source":0,"target":21},{"source":1,"target":0},{"source":1,"target":22},{"source":1,"target":23},{"source":1,"target":24},{"source":1,"target":25},{"source":22,"target":2},{"source":22,"target":26},{"source":22,"target":1},{"source":26,"target":2},{"source":23,"target":3},{"source":23,"target":27},{"source":23,"target":1},{"source":27,"target":3},{"source":24,"target":5},{"source":24,"target":28},{"source":24,"target":1},{"source":28,"target":5},{"source":25,"target":8},{"source":25,"target":29},{"source":25,"target":1},{"source":29,"target":8},{"source":2,"target":0},{"source":2,"target":30},{"source":2,"target":31},{"source":30,"target":32},{"source":30,"target":2},{"source":31,"target":15},{"source":31,"target":33},{"source":31,"target":2},{"source":33,"target":15},{"source":3,"target":0},{"source":3,"target":34},{"source":34,"target":4},{"source":34,"target":35},{"source":34,"target":3},{"source":35,"target":4},{"source":4,"target":0},{"source":4,"target":36},{"source":4,"target":37},{"source":36,"target":38},{"source":36,"target":4},{"source":37,"target":16},{"source":37,"target":39},{"source":37,"target":4},{"source":39,"target":16},{"source":5,"target":0},{"source":5,"target":40},{"source":40,"target":17},{"source":40,"target":41},{"source":40,"target":5},{"source":41,"target":17},{"source":6,"target":0},{"source":6,"target":42},{"source":42,"target":17},{"source":42,"target":43},{"source":42,"target":6},{"source":43,"target":17},{"source":7,"target":0},{"source":8,"target":0},{"source":8,"target":44},{"source":44,"target":1},{"source":44,"target":45},{"source":44,"target":8},{"source":45,"target":1},{"source":9,"target":0},{"source":9,"target":7},{"source":9,"target":46},{"source":46,"target":7},{"source":10,"target":0},{"source":10,"target":7},{"source":10,"target":47},{"source":47,"target":7},{"source":11,"target":0},{"source":11,"target":7},{"source":11,"target":48},{"source":48,"target":7},{"source":12,"target":0},{"source":12,"target":7},{"source":12,"target":49},{"source":49,"target":7},{"source":13,"target":0},{"source":13,"target":6},{"source":13,"target":50},{"source":50,"target":6},{"source":14,"target":0},{"source":14,"target":6},{"source":14,"target":51},{"source":51,"target":6},{"source":15,"target":0},{"source":15,"target":52},{"source":52,"target":53},{"source":52,"target":15},{"source":16,"target":0},{"source":16,"target":54},{"source":54,"target":55},{"source":54,"target":16},{"source":17,"target":0},{"source":17,"target":56},{"source":56,"target":6},{"source":56,"target":57},{"source":56,"target":17},{"source":57,"target":6},{"source":18,"target":0},{"source":18,"target":17},{"source":18,"target":58},{"source":18,"target":59},{"source":18,"target":60},{"source":18,"target":61},{"source":58,"target":62},{"source":58,"target":18},{"source":59,"target":63},{"source":59,"target":18},{"source":60,"target":7},{"source":60,"target":64},{"source":60,"target":18},{"source":64,"target":7},{"source":61,"target":17},{"source":19,"target":0},{"source":19,"target":17},{"source":19,"target":65},{"source":19,"target":66},{"source":65,"target":1},{"source":65,"target":67},{"source":65,"target":19},{"source":67,"target":1},{"source":66,"target":17},{"source":20,"target":0},{"source":20,"target":19},{"source":20,"target":68},{"source":68,"target":19},{"source":21,"target":0},{"source":21,"target":19},{"source":21,"target":69},{"source":69,"target":19}],"multigraph":true}