<?xml version="1.0" encoding="UTF-8"?>
<ExecPlan xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <PlanId>2659</PlanId>
  <Format>VOTABLE</Format>
  <PortalURL>http://test.openskyquery.net/sky/skyportal/PortalJobs.asmx</PortalURL>
  <PlanElements>
    <PlanElement>
      <Statement>
        <SelectionList xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Item xsi:type="columnReferenceType" Table="o" Name="objid"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="ra"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="r"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="type"/>
          <Item xsi:type="columnReferenceType" Table="t" Name="objid"/>
        </SelectionList>
        <From xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Table xsi:type="archiveTableType" Archive="sdss" Name="photoprimary" Alias="o"/>
          <Table xsi:type="archiveTableType" Archive="twomass" Name="photoprimary" Alias="t"/>
        </From>
        <Where xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Condition xsi:type="intersectionSearchType">
            <Condition xsi:type="intersectionSearchType">
              <Condition xsi:type="xMatchType">
                <Table xsi:type="includeTableType" Name="o"/>
                <Table xsi:type="includeTableType" Name="t"/>
                <Nature>&lt;</Nature>
                <Sigma xsi:type="realType" Value="3.5"/>
              </Condition>
              <Condition xsi:type="regionSearchType">
                <Region xmlns:q1="urn:nvo-region" xsi:type="q1:circleType" coord_system_id="">
                  <q1:Center ID="" coord_system_id="">
                    <Pos2Vector xmlns="urn:nvo-coords">
                      <Name>Ra Dec</Name>
                      <CoordValue>
                        <Value>
                          <double>181.3</double>
                          <double>-0.76</double>
                        </Value>
                      </CoordValue>
                    </Pos2Vector>
                  </q1:Center>
                  <q1:Radius>6.5</q1:Radius>
                </Region>
              </Condition>
            </Condition>
            <Condition xsi:type="comparisonPredType" Comparison="=">
              <Arg xsi:type="columnReferenceType" Table="o" Name="type"/>
              <Arg xsi:type="atomType">
                <Literal xsi:type="integerType" Value="3"/>
              </Arg>
            </Condition>
          </Condition>
        </Where>
      </Statement>
      <Target>TWOMASS</Target>
      <Hosts>
        <string>http://test.openskyquery.net/nodes/TWOMASS/nodeb.asmx</string>
      </Hosts>
    </PlanElement>
    <PlanElement>
      <Statement>
        <SelectionList xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Item xsi:type="columnReferenceType" Table="o" Name="objid"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="ra"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="r"/>
          <Item xsi:type="columnReferenceType" Table="o" Name="type"/>
          <Item xsi:type="columnReferenceType" Table="t" Name="objid"/>
        </SelectionList>
        <From xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Table xsi:type="archiveTableType" Archive="sdss" Name="photoprimary" Alias="o"/>
          <Table xsi:type="archiveTableType" Archive="twomass" Name="photoprimary" Alias="t"/>
        </From>
        <Where xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4">
          <Condition xsi:type="intersectionSearchType">
            <Condition xsi:type="intersectionSearchType">
              <Condition xsi:type="xMatchType">
                <Table xsi:type="includeTableType" Name="o"/>
                <Table xsi:type="includeTableType" Name="t"/>
                <Nature>&lt;</Nature>
                <Sigma xsi:type="realType" Value="3.5"/>
              </Condition>
              <Condition xsi:type="regionSearchType">
                <Region xmlns:q2="urn:nvo-region" xsi:type="q2:circleType" coord_system_id="">
                  <q2:Center ID="" coord_system_id="">
                    <Pos2Vector xmlns="urn:nvo-coords">
                      <Name>Ra Dec</Name>
                      <CoordValue>
                        <Value>
                          <double>181.3</double>
                          <double>-0.76</double>
                        </Value>
                      </CoordValue>
                    </Pos2Vector>
                  </q2:Center>
                  <q2:Radius>6.5</q2:Radius>
                </Region>
              </Condition>
            </Condition>
            <Condition xsi:type="comparisonPredType" Comparison="=">
              <Arg xsi:type="columnReferenceType" Table="o" Name="type"/>
              <Arg xsi:type="atomType">
                <Literal xsi:type="integerType" Value="3"/>
              </Arg>
            </Condition>
          </Condition>
        </Where>
      </Statement>
      <Target>SDSS</Target>
      <Hosts>
        <string>http://test.openskyquery.net/nodes//SDSS/nodeb.asmx</string>
      </Hosts>
    </PlanElement>
  </PlanElements>
</ExecPlan>
