# NavigationProperties

BaseTable: Adjacency_YieldChanges
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Adjacency_YieldChanges as T2 on T2.AdjacentDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: FeatureReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Adjacency_YieldChanges as T2 on T2.AdjacentFeature = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Adjacency_YieldChanges as T2 on T2.AdjacentImprovement = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: ObsoleteCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Adjacency_YieldChanges as T2 on T2.ObsoleteCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: ObsoleteTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Adjacency_YieldChanges as T2 on T2.ObsoleteTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Adjacency_YieldChanges as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Adjacency_YieldChanges as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: TerrainReference
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Adjacency_YieldChanges as T2 on T2.AdjacentTerrain = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacency_YieldChanges
PropertyName: YieldTypeReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Adjacency_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Adjacent_AppealYieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Adjacent_AppealYieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Agendas
PropertyName: FirstExclusions
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join ExclusiveAgendas as T2 on T2.AgendaTwo = T1.AgendaType inner join Agendas as T3 on T3.AgendaType = T2.AgendaOne where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Agendas
PropertyName: RandomAgendaCollection
TargetTable: RandomAgendas
Query:
  SELECT T1.rowid from RandomAgendas as T1 inner join Agendas as T2 on T2.AgendaType = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Agendas
PropertyName: SecondExclusions
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join ExclusiveAgendas as T2 on T2.AgendaOne = T1.AgendaType inner join Agendas as T3 on T3.AgendaType = T2.AgendaTwo where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Agendas
PropertyName: TraitCollection
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join AgendaTraits as T2 on T2.TraitType = T1.TraitType inner join Agendas as T3 on T3.AgendaType = T2.AgendaType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: AgendaPreferredLeaders
PropertyName: LeaderReference
TargetTable: Leaders
Query:
  SELECT T1.rowid from Leaders as T1 inner join AgendaPreferredLeaders as T2 on T2.LeaderType = T1.LeaderType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AgendaPreferredLeaders
PropertyName: RandomAgendaReference
TargetTable: RandomAgendas
Query:
  SELECT T1.rowid from RandomAgendas as T1 inner join AgendaPreferredLeaders as T2 on T2.AgendaType = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiBuildSpecializations
PropertyName: PriorityReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join AiBuildSpecializations as T2 on T2.PrioritizationYield = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiBuildSpecializations
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join AiBuildSpecializations as T2 on T2.BuildingYield = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiFavoredItems
PropertyName: MaxDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join AiFavoredItems as T2 on T2.MaxDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiFavoredItems
PropertyName: MinDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join AiFavoredItems as T2 on T2.MinDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiLists
PropertyName: MaxDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join AiLists as T2 on T2.MaxDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: AiLists
PropertyName: MinDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join AiLists as T2 on T2.MinDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianAttackForces
PropertyName: MaxDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join BarbarianAttackForces as T2 on T2.MaxTargetDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianAttackForces
PropertyName: MinDifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join BarbarianAttackForces as T2 on T2.MinTargetDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianTribes
PropertyName: AttackCollection
TargetTable: BarbarianAttackForces
Query:
  SELECT T1.rowid from BarbarianAttackForces as T1 inner join BarbarianTribeForces as T2 on T2.AttackForceType = T1.AttackForceType inner join BarbarianTribes as T3 on T3.TribeType = T2.TribeType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: BarbarianTribes
PropertyName: RequiredResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join BarbarianTribes as T2 on T2.RequiredResource = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianTribes
PropertyName: TribeNames
TargetTable: BarbarianTribeNames
Query:
  SELECT T1.rowid from BarbarianTribeNames as T1 inner join BarbarianTribes as T2 on T2.TribeType = T1.TribeType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: BarbarianTribe_MapConditions
PropertyName: MapConditionSetTypeReference
TargetTable: BarbarianTribe_MapConditionSets
Query:
  SELECT T1.rowid from BarbarianTribe_MapConditionSets as T1 inner join BarbarianTribe_MapConditions as T2 on T2.MapConditionSetType = T1.MapConditionSetType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianTribe_MapConditionSets
PropertyName: TribeTypeReference
TargetTable: BarbarianTribes
Query:
  SELECT T1.rowid from BarbarianTribes as T1 inner join BarbarianTribe_MapConditionSets as T2 on T2.TribeType = T1.TribeType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BarbarianTribeNames
PropertyName: AttackCollection
TargetTable: BarbarianAttackForces
Query:
  SELECT T1.rowid from BarbarianAttackForces as T1 inner join BarbarianTribeForces as T2 on T2.AttackForceType = T1.AttackForceType inner join BarbarianTribeNames as T3 on T3.TribeNameType = T2.SpecificTribeType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: BarbarianTribeNames
PropertyName: TribeTypeReference
TargetTable: BarbarianTribes
Query:
  SELECT T1.rowid from BarbarianTribes as T1 inner join BarbarianTribeNames as T2 on T2.TribeType = T1.TribeType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BehaviorTrees
PropertyName: TriggerCollection
TargetTable: TriggeredBehaviorTrees
Query:
  SELECT T1.rowid from TriggeredBehaviorTrees as T1 inner join BehaviorTrees as T2 on T2.TreeName = T1.TreeName where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Beliefs
PropertyName: BeliefClassTypeReference
TargetTable: BeliefClasses
Query:
  SELECT T1.rowid from BeliefClasses as T1 inner join Beliefs as T2 on T2.BeliefClassType = T1.BeliefClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BonusMinorStartingUnits
PropertyName: DifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join BonusMinorStartingUnits as T2 on T2.MinDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BonusMinorStartingUnits
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join BonusMinorStartingUnits as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BonusMinorStartingUnits
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join BonusMinorStartingUnits as T2 on T2.Unit = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: BoostingCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Boosts as T2 on T2.BoostingCivicType = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: BoostingTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Boosts as T2 on T2.BoostingTechType = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: BoostReference
TargetTable: BoostNames
Query:
  SELECT T1.rowid from BoostNames as T1 inner join Boosts as T2 on T2.BoostClass = T1.BoostType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Boosts as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Boosts as T2 on T2.CivicType = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Boosts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: GovernmentTierReference
TargetTable: GovernmentTiers
Query:
  SELECT T1.rowid from GovernmentTiers as T1 inner join Boosts as T2 on T2.GovernmentTierType = T1.TierType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Boosts as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Boosts as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: TechnologyReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Boosts as T2 on T2.TechnologyType = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: Unit1Reference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Boosts as T2 on T2.Unit1Type = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Boosts
PropertyName: Unit2Reference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Boosts as T2 on T2.Unit2Type = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BoostHandlers
PropertyName: BoostTypeReference
TargetTable: BoostNames
Query:
  SELECT T1.rowid from BoostNames as T1 inner join BoostHandlers as T2 on T2.TechBoostType = T1.BoostType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: AdjacentDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Buildings as T2 on T2.AdjacentDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: AdjacentImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Buildings as T2 on T2.AdjacentImprovement = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: AdjacentResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Buildings as T2 on T2.AdjacentResource = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: CitizenYieldChangesReference
TargetTable: Building_CitizenYieldChanges
Query:
  SELECT T1.rowid from Building_CitizenYieldChanges as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: CityAdjacentTerrainReference
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Buildings as T2 on T2.CityAdjacentTerrain = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: DependentBuildingCollection
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingPrereqs as T2 on T2.Building = T1.BuildingType inner join Buildings as T3 on T3.BuildingType = T2.PrereqBuilding where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: GreatPersonPointsReference
TargetTable: Building_GreatPersonPoints
Query:
  SELECT T1.rowid from Building_GreatPersonPoints as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: GreatWorkCollection
TargetTable: Building_GreatWorks
Query:
  SELECT T1.rowid from Building_GreatWorks as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: MutuallyExclusiveBuildingReference
TargetTable: MutuallyExclusiveBuildings
Query:
  SELECT T1.rowid from MutuallyExclusiveBuildings as T1 inner join Buildings as T2 on T2.BuildingType = T1.Building where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: PrereqBuildingCollection
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingPrereqs as T2 on T2.PrereqBuilding = T1.BuildingType inner join Buildings as T3 on T3.BuildingType = T2.Building where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Buildings as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: PrereqDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Buildings as T2 on T2.PrereqDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Buildings as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: PurchaseYieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Buildings as T2 on T2.PurchaseYield = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: ReplacedByCollection
TargetTable: BuildingReplaces
Query:
  SELECT T1.rowid from BuildingReplaces as T1 inner join Buildings as T2 on T2.BuildingType = T1.ReplacesBuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: ReplacesCollection
TargetTable: BuildingReplaces
Query:
  SELECT T1.rowid from BuildingReplaces as T1 inner join Buildings as T2 on T2.BuildingType = T1.CivUniqueBuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: RequiredFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Building_RequiredFeatures as T2 on T2.FeatureType = T1.FeatureType inner join Buildings as T3 on T3.BuildingType = T2.BuildingType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: StartingBuildingCollection
TargetTable: StartingBuildings
Query:
  SELECT T1.rowid from StartingBuildings as T1 inner join Buildings as T2 on T2.BuildingType = T1.Building where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join Buildings as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings
PropertyName: UnitsPermittedCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Unit_BuildingPrereqs as T2 on T2.Unit = T1.UnitType inner join Buildings as T3 on T3.BuildingType = T2.PrereqBuilding where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: ValidFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Building_ValidFeatures as T2 on T2.FeatureType = T1.FeatureType inner join Buildings as T3 on T3.BuildingType = T2.BuildingType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: ValidTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Building_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Buildings as T3 on T3.BuildingType = T2.BuildingType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: YieldChanges
TargetTable: Building_YieldChanges
Query:
  SELECT T1.rowid from Building_YieldChanges as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: YieldDistrictCopyReference
TargetTable: Building_YieldDistrictCopies
Query:
  SELECT T1.rowid from Building_YieldDistrictCopies as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Buildings
PropertyName: YieldsPerEra
TargetTable: Building_YieldsPerEra
Query:
  SELECT T1.rowid from Building_YieldsPerEra as T1 inner join Buildings as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Building_CitizenYieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Building_CitizenYieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_GreatPersonPoints
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_GreatPersonPoints as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_GreatPersonPoints
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join Building_GreatPersonPoints as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_GreatWorks
PropertyName: ValidObjectTypes
TargetTable: GreatWorkObjectTypes
Query:
  SELECT T1.rowid from GreatWorkObjectTypes as T1 inner join GreatWork_ValidSubTypes as T2 on T2.GreatWorkObjectType = T1.GreatWorkObjectType inner join GreatWorkSlotTypes as T3 on T3.GreatWorkSlotType = T2.GreatWorkSlotType inner join Building_GreatWorks as T4 on T4.GreatWorkSlotType = T3.GreatWorkSlotType where T4.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Building_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Building_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_YieldDistrictCopies
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_YieldDistrictCopies as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_YieldDistrictCopies
PropertyName: NewYieldTypeReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Building_YieldDistrictCopies as T2 on T2.NewYieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_YieldDistrictCopies
PropertyName: OldYieldTypeReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Building_YieldDistrictCopies as T2 on T2.OldYieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BuildingConditions
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingConditions as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BuildingPrereqs
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingPrereqs as T2 on T2.Building = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BuildingPrereqs
PropertyName: PrereqBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingPrereqs as T2 on T2.PrereqBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BuildingReplaces
PropertyName: BaseBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingReplaces as T2 on T2.ReplacesBuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: BuildingReplaces
PropertyName: ReplacementBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join BuildingReplaces as T2 on T2.CivUniqueBuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Civics
PropertyName: BoostCollectionRef
TargetTable: Boosts
Query:
  SELECT T1.rowid from Boosts as T1 inner join Civics as T2 on T2.CivicType = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: BuildingCollectionReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: DistrictCollectionReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Civics as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Civics
PropertyName: GovernmentCollection
TargetTable: Governments
Query:
  SELECT T1.rowid from Governments as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: ImprovementTourismCollection
TargetTable: Improvement_Tourism
Query:
  SELECT T1.rowid from Improvement_Tourism as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: MandatoryObsoleteCivicCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Civics as T2 on T2.CivicType = T1.MandatoryObsoleteCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: ObsoleteCivicCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Civics as T2 on T2.CivicType = T1.ObsoleteCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: PolicyCollection
TargetTable: Policies
Query:
  SELECT T1.rowid from Policies as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: PrereqCivicCollection
TargetTable: CivicPrereqs
Query:
  SELECT T1.rowid from CivicPrereqs as T1 inner join Civics as T2 on T2.CivicType = T1.Civic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: StartingCivicCollection
TargetTable: StartingCivics
Query:
  SELECT T1.rowid from StartingCivics as T1 inner join Civics as T2 on T2.CivicType = T1.Civic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civics
PropertyName: UnitCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Civics as T2 on T2.CivicType = T1.PrereqCivic where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: CivicPrereqs
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join CivicPrereqs as T2 on T2.Civic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CivicPrereqs
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join CivicPrereqs as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CivicRandomCosts
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join CivicRandomCosts as T2 on T2.CivicType = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Civilizations
PropertyName: CitizenNameCollection
TargetTable: CivilizationCitizenNames
Query:
  SELECT T1.rowid from CivilizationCitizenNames as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: CityNameCollection
TargetTable: CityNames
Query:
  SELECT T1.rowid from CityNames as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: ReligionCollection
TargetTable: Religions
Query:
  SELECT T1.rowid from Religions as T1 inner join FavoredReligions as T2 on T2.ReligionType = T1.ReligionType inner join Civilizations as T3 on T3.CivilizationType = T2.CivilizationType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: StartBiasFeatureCollection
TargetTable: StartBiasFeatures
Query:
  SELECT T1.rowid from StartBiasFeatures as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: StartBiasResourceCollection
TargetTable: StartBiasResources
Query:
  SELECT T1.rowid from StartBiasResources as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: StartBiasRiverCollection
TargetTable: StartBiasRivers
Query:
  SELECT T1.rowid from StartBiasRivers as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: StartBiasTerrainCollection
TargetTable: StartBiasTerrains
Query:
  SELECT T1.rowid from StartBiasTerrains as T1 inner join Civilizations as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Civilizations
PropertyName: TraitCollection
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join CivilizationTraits as T2 on T2.TraitType = T1.TraitType inner join Civilizations as T3 on T3.CivilizationType = T2.CivilizationType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: CivilizationLevels
PropertyName: DiplomaticStartCollection
TargetTable: DiplomaticStartStates
Query:
  SELECT T1.rowid from DiplomaticStartStates as T1 inner join CivilizationLevels as T2 on T2.CivilizationLevelType = T1.PlayerCivLevel where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticActions
PropertyName: InitiatorObsoleteCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join DiplomaticActions as T2 on T2.InitiatorObsoleteCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions
PropertyName: InitiatorPrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join DiplomaticActions as T2 on T2.InitiatorPrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions
PropertyName: InitiatorPrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join DiplomaticActions as T2 on T2.InitiatorPrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions
PropertyName: TargetPrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join DiplomaticActions as T2 on T2.TargetPrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions
PropertyName: TargetPrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join DiplomaticActions as T2 on T2.TargetPrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions
PropertyName: ValidStates
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticStateActions as T2 on T2.StateType = T1.StateType inner join DiplomaticActions as T3 on T3.DiplomaticActionType = T2.DiplomaticActionType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticStartStates
PropertyName: DiplomaticStateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticStartStates as T2 on T2.DiplomaticStateType = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStartStates
PropertyName: OpponentCivLevelReference
TargetTable: CivilizationLevels
Query:
  SELECT T1.rowid from CivilizationLevels as T1 inner join DiplomaticStartStates as T2 on T2.OpponentCivLevel = T1.CivilizationLevelType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStartStates
PropertyName: PlayerCivLevelReference
TargetTable: CivilizationLevels
Query:
  SELECT T1.rowid from CivilizationLevels as T1 inner join DiplomaticStartStates as T2 on T2.PlayerCivLevel = T1.CivilizationLevelType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStates
PropertyName: TransitionActionCollection
TargetTable: DiplomaticStateActions
Query:
  SELECT T1.rowid from DiplomaticStateActions as T1 inner join DiplomaticStates as T2 on T2.StateType = T1.TransitionToState where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticStates
PropertyName: TransitionsOut
TargetTable: DiplomaticStateTransitions
Query:
  SELECT T1.rowid from DiplomaticStateTransitions as T1 inner join DiplomaticStates as T2 on T2.StateType = T1.BaseState where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticStates
PropertyName: ValidActions
TargetTable: DiplomaticStateActions
Query:
  SELECT T1.rowid from DiplomaticStateActions as T1 inner join DiplomaticStates as T2 on T2.StateType = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticStateActions
PropertyName: DiplomaticActionReference
TargetTable: DiplomaticActions
Query:
  SELECT T1.rowid from DiplomaticActions as T1 inner join DiplomaticStateActions as T2 on T2.DiplomaticActionType = T1.DiplomaticActionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStateActions
PropertyName: TransitionStateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticStateActions as T2 on T2.TransitionToState = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStateTransitions
PropertyName: BaseStateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticStateTransitions as T2 on T2.BaseState = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticStateTransitions
PropertyName: TransitionStateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticStateTransitions as T2 on T2.TransitionState = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticTriggers
PropertyName: RequiredStateCollection
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticTriggers_RequiredStates as T2 on T2.RequiredState = T1.StateType inner join DiplomaticTriggers as T3 on T3.TriggerType = T2.TriggerType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: DiplomaticTriggeredTransitions
PropertyName: CivLevelReference
TargetTable: CivilizationLevels
Query:
  SELECT T1.rowid from CivilizationLevels as T1 inner join DiplomaticTriggeredTransitions as T2 on T2.CivilizationLevel = T1.CivilizationLevelType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticTriggeredTransitions
PropertyName: OpponentCivLevelReference
TargetTable: CivilizationLevels
Query:
  SELECT T1.rowid from CivilizationLevels as T1 inner join DiplomaticTriggeredTransitions as T2 on T2.OpponentCivilizationLevel = T1.CivilizationLevelType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticTriggeredTransitions
PropertyName: TransitionStateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticTriggeredTransitions as T2 on T2.TransitionState = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticTriggeredTransitions
PropertyName: TriggerReference
TargetTable: DiplomaticTriggers
Query:
  SELECT T1.rowid from DiplomaticTriggers as T1 inner join DiplomaticTriggeredTransitions as T2 on T2.TriggerType = T1.TriggerType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticTriggers_RequiredStates
PropertyName: StateReference
TargetTable: DiplomaticStates
Query:
  SELECT T1.rowid from DiplomaticStates as T1 inner join DiplomaticTriggers_RequiredStates as T2 on T2.RequiredState = T1.StateType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticVisibilitySources
PropertyName: GreatPersonIndividualReference
TargetTable: GreatPersonIndividuals
Query:
  SELECT T1.rowid from GreatPersonIndividuals as T1 inner join DiplomaticVisibilitySources as T2 on T2.GreatPersonIndividualType = T1.GreatPersonIndividualType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticVisibilitySources
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join DiplomaticVisibilitySources as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticVisibilitySources
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join DiplomaticVisibilitySources as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Districts
PropertyName: AdjacencyAppealYieldChanges
TargetTable: Adjacent_AppealYieldChanges
Query:
  SELECT T1.rowid from Adjacent_AppealYieldChanges as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: AdjacencyYieldChanges
TargetTable: District_Adjacencies
Query:
  SELECT T1.rowid from District_Adjacencies as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: AppealHousingChangeReference
TargetTable: AppealHousingChanges
Query:
  SELECT T1.rowid from AppealHousingChanges as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: BuildingCollectionReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Districts as T2 on T2.DistrictType = T1.PrereqDistrict where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: CitizenGreatPersonPointsReference
TargetTable: District_CitizenGreatPersonPoints
Query:
  SELECT T1.rowid from District_CitizenGreatPersonPoints as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: CitizenYieldChangesReference
TargetTable: District_CitizenYieldChanges
Query:
  SELECT T1.rowid from District_CitizenYieldChanges as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: ExclusionReference
TargetTable: ExcludedDistricts
Query:
  SELECT T1.rowid from ExcludedDistricts as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: GreatPersonPointsReference
TargetTable: District_GreatPersonPoints
Query:
  SELECT T1.rowid from District_GreatPersonPoints as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: MutuallyExclusiveDistrictReference
TargetTable: MutuallyExclusiveDistricts
Query:
  SELECT T1.rowid from MutuallyExclusiveDistricts as T1 inner join Districts as T2 on T2.DistrictType = T1.District where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Districts as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Districts
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Districts as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Districts
PropertyName: ProjectCollection
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Districts as T2 on T2.DistrictType = T1.PrereqDistrict where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: ReplacedByCollection
TargetTable: DistrictReplaces
Query:
  SELECT T1.rowid from DistrictReplaces as T1 inner join Districts as T2 on T2.DistrictType = T1.ReplacesDistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: ReplacesCollection
TargetTable: DistrictReplaces
Query:
  SELECT T1.rowid from DistrictReplaces as T1 inner join Districts as T2 on T2.DistrictType = T1.CivUniqueDistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: RequiredFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join District_RequiredFeatures as T2 on T2.FeatureType = T1.FeatureType inner join Districts as T3 on T3.DistrictType = T2.DistrictType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: StartingBuildingCollection
TargetTable: StartingBuildings
Query:
  SELECT T1.rowid from StartingBuildings as T1 inner join Districts as T2 on T2.DistrictType = T1.District where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: TradeRouteYieldChanges
TargetTable: District_TradeRouteYields
Query:
  SELECT T1.rowid from District_TradeRouteYields as T1 inner join Districts as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Districts
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join Districts as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Districts
PropertyName: ValidTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join District_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Districts as T3 on T3.DistrictType = T2.DistrictType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: District_Adjacencies
PropertyName: YieldChangeReference
TargetTable: Adjacency_YieldChanges
Query:
  SELECT T1.rowid from Adjacency_YieldChanges as T1 inner join District_Adjacencies as T2 on T2.YieldChangeId = T1.ID where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_CitizenGreatPersonPoints
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join District_CitizenGreatPersonPoints as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_CitizenGreatPersonPoints
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join District_CitizenGreatPersonPoints as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_CitizenYieldChanges
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join District_CitizenYieldChanges as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_CitizenYieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join District_CitizenYieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_GreatPersonPoints
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join District_GreatPersonPoints as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_GreatPersonPoints
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join District_GreatPersonPoints as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_TradeRouteYields
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join District_TradeRouteYields as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: District_TradeRouteYields
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join District_TradeRouteYields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DistrictReplaces
PropertyName: BaseDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join DistrictReplaces as T2 on T2.ReplacesDistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DistrictReplaces
PropertyName: ReplacementDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join DistrictReplaces as T2 on T2.CivUniqueDistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Eras
PropertyName: BonusMinorStartingUnitCollection
TargetTable: BonusMinorStartingUnits
Query:
  SELECT T1.rowid from BonusMinorStartingUnits as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: CivicCollectionReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Eras as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: MajorStartingUnitCollection
TargetTable: MajorStartingUnits
Query:
  SELECT T1.rowid from MajorStartingUnits as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingBuildingCollection
TargetTable: StartingBuildings
Query:
  SELECT T1.rowid from StartingBuildings as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingCivicBoostedCollection
TargetTable: StartingBoostedCivics
Query:
  SELECT T1.rowid from StartingBoostedCivics as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingCivicCollection
TargetTable: StartingCivics
Query:
  SELECT T1.rowid from StartingCivics as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingEraCollection
TargetTable: StartEras
Query:
  SELECT T1.rowid from StartEras as T1 inner join Eras as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingGovernmentCollection
TargetTable: StartingGovernments
Query:
  SELECT T1.rowid from StartingGovernments as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: StartingTechnologyBoostedCollection
TargetTable: StartingBoostedTechnologies
Query:
  SELECT T1.rowid from StartingBoostedTechnologies as T1 inner join Eras as T2 on T2.EraType = T1.Era where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Eras
PropertyName: TechCollectionReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Eras as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: ExcludedAdjacencies
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join ExcludedAdjacencies as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ExcludedDistricts
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join ExcludedDistricts as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ExcludedGreatPersonClasses
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join ExcludedGreatPersonClasses as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ExclusiveAgendas
PropertyName: AgendaOneReference
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join ExclusiveAgendas as T2 on T2.AgendaOne = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ExclusiveAgendas
PropertyName: AgendaTwoReference
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join ExclusiveAgendas as T2 on T2.AgendaTwo = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Features
PropertyName: AddCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Features as T2 on T2.AddCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Features
PropertyName: AdjacentFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Feature_AdjacentFeatures as T2 on T2.FeatureTypeAdjacent = T1.FeatureType inner join Features as T3 on T3.FeatureType = T2.FeatureType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: AdjacentTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Feature_AdjacentTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Features as T3 on T3.FeatureType = T2.FeatureType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: AdjacentYields
TargetTable: Feature_AdjacentYields
Query:
  SELECT T1.rowid from Feature_AdjacentYields as T1 inner join Features as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: FeatureRemoveCollection
TargetTable: Feature_Removes
Query:
  SELECT T1.rowid from Feature_Removes as T1 inner join Features as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: NotAdjacentTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Feature_NotAdjacentTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Features as T3 on T3.FeatureType = T2.FeatureType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: NotNearFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Feature_NotNearFeatures as T2 on T2.FeatureTypeAvoid = T1.FeatureType inner join Features as T3 on T3.FeatureType = T2.FeatureType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: RemoveTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Features as T2 on T2.RemoveTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Features
PropertyName: StartBiasFeatureCollection
TargetTable: StartBiasFeatures
Query:
  SELECT T1.rowid from StartBiasFeatures as T1 inner join Features as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: UnitMovements
TargetTable: Feature_UnitMovements
Query:
  SELECT T1.rowid from Feature_UnitMovements as T1 inner join Features as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: ValidTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Feature_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Features as T3 on T3.FeatureType = T2.FeatureType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Features
PropertyName: YieldChanges
TargetTable: Feature_YieldChanges
Query:
  SELECT T1.rowid from Feature_YieldChanges as T1 inner join Features as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Feature_AdjacentYields
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Feature_AdjacentYields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Feature_Removes
PropertyName: FeatureReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Feature_Removes as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Feature_Removes
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Feature_Removes as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Feature_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Feature_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GameSpeeds
PropertyName: GameSpeedScalingCollection
TargetTable: GameSpeed_Scalings
Query:
  SELECT T1.rowid from GameSpeed_Scalings as T1 inner join GameSpeeds as T2 on T2.GameSpeedType = T1.GameSpeedType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GameSpeeds
PropertyName: GameSpeedTurnCollection
TargetTable: GameSpeed_Turns
Query:
  SELECT T1.rowid from GameSpeed_Turns as T1 inner join GameSpeeds as T2 on T2.GameSpeedType = T1.GameSpeedType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GameSpeed_Scalings
PropertyName: GameSpeedDurationCollection
TargetTable: GameSpeed_Durations
Query:
  SELECT T1.rowid from GameSpeed_Durations as T1 inner join GameSpeed_Scalings as T2 on T2.GameSpeedScalingType = T1.GameSpeedScalingType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GameSpeed_Turns
PropertyName: GameSpeedReference
TargetTable: GameSpeeds
Query:
  SELECT T1.rowid from GameSpeeds as T1 inner join GameSpeed_Turns as T2 on T2.GameSpeedType = T1.GameSpeedType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GoodyHuts
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join GoodyHuts as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GoodyHuts
PropertyName: SubTypeGoodyHutCollection
TargetTable: GoodyHutSubTypes
Query:
  SELECT T1.rowid from GoodyHutSubTypes as T1 inner join GoodyHuts as T2 on T2.GoodyHutType = T1.GoodyHut where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Governments
PropertyName: GovernmentSlotsReference
TargetTable: Government_SlotCounts
Query:
  SELECT T1.rowid from Government_SlotCounts as T1 inner join Governments as T2 on T2.GovernmentType = T1.GovernmentType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Governments
PropertyName: PolicyToUnlockReference
TargetTable: Policies
Query:
  SELECT T1.rowid from Policies as T1 inner join Governments as T2 on T2.PolicyToUnlock = T1.PolicyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Governments
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Governments as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Governments
PropertyName: StartingGovernmentCollection
TargetTable: StartingGovernments
Query:
  SELECT T1.rowid from StartingGovernments as T1 inner join Governments as T2 on T2.GovernmentType = T1.Government where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Government_SlotCounts
PropertyName: GovernmentReference
TargetTable: Governments
Query:
  SELECT T1.rowid from Governments as T1 inner join Government_SlotCounts as T2 on T2.GovernmentType = T1.GovernmentType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Government_SlotCounts
PropertyName: SlotReference
TargetTable: GovernmentSlots
Query:
  SELECT T1.rowid from GovernmentSlots as T1 inner join Government_SlotCounts as T2 on T2.GovernmentSlotType = T1.GovernmentSlotType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GovernmentTiers
PropertyName: GovernmentsOfTier
TargetTable: Governments
Query:
  SELECT T1.rowid from Governments as T1 inner join GovernmentTiers as T2 on T2.TierType = T1.Tier where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatPersonClasses
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join GreatPersonClasses as T2 on T2.DistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonClasses
PropertyName: ExclusionReference
TargetTable: ExcludedGreatPersonClasses
Query:
  SELECT T1.rowid from ExcludedGreatPersonClasses as T1 inner join GreatPersonClasses as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatPersonClasses
PropertyName: PseudoYieldReference
TargetTable: PseudoYields
Query:
  SELECT T1.rowid from PseudoYields as T1 inner join GreatPersonClasses as T2 on T2.PseudoYieldType = T1.PseudoYieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonClasses
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join GreatPersonClasses as T2 on T2.UnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: ActionRequiresCityGreatWorkObjectTypeReference
TargetTable: GreatWorkObjectTypes
Query:
  SELECT T1.rowid from GreatWorkObjectTypes as T1 inner join GreatPersonIndividuals as T2 on T2.ActionRequiresCityGreatWorkObjectType = T1.GreatWorkObjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: ActionRequiresCompletedDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join GreatPersonIndividuals as T2 on T2.ActionRequiresCompletedDistrictType = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: ActionRequiresMissingBuildingTypeReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join GreatPersonIndividuals as T2 on T2.ActionRequiresMissingBuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: ActionRequiresOnOrAdjacentFeatureTypeReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join GreatPersonIndividuals as T2 on T2.ActionRequiresOnOrAdjacentFeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join GreatPersonIndividuals as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join GreatPersonIndividuals as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatPersonIndividuals
PropertyName: GreatWorkCollection
TargetTable: GreatWorks
Query:
  SELECT T1.rowid from GreatWorks as T1 inner join GreatPersonIndividuals as T2 on T2.GreatPersonIndividualType = T1.GreatPersonIndividualType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatWorks
PropertyName: BuildingCollection
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_GreatWorks as T2 on T2.BuildingType = T1.BuildingType inner join GreatWorkSlotTypes as T3 on T3.GreatWorkSlotType = T2.GreatWorkSlotType inner join GreatWork_ValidSubTypes as T4 on T4.GreatWorkSlotType = T3.GreatWorkSlotType inner join GreatWorkObjectTypes as T5 on T5.GreatWorkObjectType = T4.GreatWorkObjectType inner join GreatWorks as T6 on T6.GreatWorkObjectType = T5.GreatWorkObjectType where T6.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatWorks
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join GreatWorks as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWorks
PropertyName: GreatPersonReference
TargetTable: GreatPersonIndividuals
Query:
  SELECT T1.rowid from GreatPersonIndividuals as T1 inner join GreatWorks as T2 on T2.GreatPersonIndividualType = T1.GreatPersonIndividualType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWorks
PropertyName: GreatWorkObjectReference
TargetTable: GreatWorkObjectTypes
Query:
  SELECT T1.rowid from GreatWorkObjectTypes as T1 inner join GreatWorks as T2 on T2.GreatWorkObjectType = T1.GreatWorkObjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWorks
PropertyName: YieldChanges
TargetTable: GreatWork_YieldChanges
Query:
  SELECT T1.rowid from GreatWork_YieldChanges as T1 inner join GreatWorks as T2 on T2.GreatWorkType = T1.GreatWorkType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatWork_ValidSubTypes
PropertyName: ObjectReference
TargetTable: GreatWorkObjectTypes
Query:
  SELECT T1.rowid from GreatWorkObjectTypes as T1 inner join GreatWork_ValidSubTypes as T2 on T2.GreatWorkObjectType = T1.GreatWorkObjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWork_ValidSubTypes
PropertyName: SlotReference
TargetTable: GreatWorkSlotTypes
Query:
  SELECT T1.rowid from GreatWorkSlotTypes as T1 inner join GreatWork_ValidSubTypes as T2 on T2.GreatWorkSlotType = T1.GreatWorkSlotType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWork_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join GreatWork_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GreatWorkObjectTypes
PropertyName: BuildingCollection
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_GreatWorks as T2 on T2.BuildingType = T1.BuildingType inner join GreatWorkSlotTypes as T3 on T3.GreatWorkSlotType = T2.GreatWorkSlotType inner join GreatWork_ValidSubTypes as T4 on T4.GreatWorkSlotType = T3.GreatWorkSlotType inner join GreatWorkObjectTypes as T5 on T5.GreatWorkObjectType = T4.GreatWorkObjectType where T5.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GreatWorkObjectTypes
PropertyName: PseudoYieldReference
TargetTable: PseudoYields
Query:
  SELECT T1.rowid from PseudoYields as T1 inner join GreatWorkObjectTypes as T2 on T2.PseudoYieldType = T1.PseudoYieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: HeroClasses
PropertyName: DiscoveryMinEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join HeroClasses as T2 on T2.DiscoveryMinEraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: HeroClasses
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join HeroClasses as T2 on T2.UnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: HeroClassProgressions
PropertyName: HeroClassReference
TargetTable: HeroClasses
Query:
  SELECT T1.rowid from HeroClasses as T1 inner join HeroClassProgressions as T2 on T2.HeroClassType = T1.HeroClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: HeroClassUnitCommands
PropertyName: HeroClassReference
TargetTable: HeroClasses
Query:
  SELECT T1.rowid from HeroClasses as T1 inner join HeroClassUnitCommands as T2 on T2.HeroClassType = T1.HeroClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: HeroClassUnitCommands
PropertyName: UnitCommandReference
TargetTable: UnitCommands
Query:
  SELECT T1.rowid from UnitCommands as T1 inner join HeroClassUnitCommands as T2 on T2.UnitCommandType = T1.CommandType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvements
PropertyName: AdjacencyYieldChanges
TargetTable: Improvement_Adjacencies
Query:
  SELECT T1.rowid from Improvement_Adjacencies as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: BonusYieldChanges
TargetTable: Improvement_BonusYieldChanges
Query:
  SELECT T1.rowid from Improvement_BonusYieldChanges as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: InvalidAdjacentFeature
TargetTable: Improvement_InvalidAdjacentFeatures
Query:
  SELECT T1.rowid from Improvement_InvalidAdjacentFeatures as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Improvements as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvements
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Improvements as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvements
PropertyName: TourismCollection
TargetTable: Improvement_Tourism
Query:
  SELECT T1.rowid from Improvement_Tourism as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join Improvements as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvements
PropertyName: ValidAdjacentResources
TargetTable: Improvement_ValidAdjacentResources
Query:
  SELECT T1.rowid from Improvement_ValidAdjacentResources as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: ValidAdjacentTerrains
TargetTable: Improvement_ValidAdjacentTerrains
Query:
  SELECT T1.rowid from Improvement_ValidAdjacentTerrains as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: ValidBuildUnits
TargetTable: Improvement_ValidBuildUnits
Query:
  SELECT T1.rowid from Improvement_ValidBuildUnits as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: ValidFeatures
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Improvement_ValidFeatures as T2 on T2.FeatureType = T1.FeatureType inner join Improvements as T3 on T3.ImprovementType = T2.ImprovementType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: ValidResources
TargetTable: Improvement_ValidResources
Query:
  SELECT T1.rowid from Improvement_ValidResources as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: ValidTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Improvement_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Improvements as T3 on T3.ImprovementType = T2.ImprovementType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: YieldChanges
TargetTable: Improvement_YieldChanges
Query:
  SELECT T1.rowid from Improvement_YieldChanges as T1 inner join Improvements as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Improvements
PropertyName: YieldFromAppealReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Improvements as T2 on T2.YieldFromAppeal = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_Adjacencies
PropertyName: YieldChangeReference
TargetTable: Adjacency_YieldChanges
Query:
  SELECT T1.rowid from Adjacency_YieldChanges as T1 inner join Improvement_Adjacencies as T2 on T2.YieldChangeId = T1.ID where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_BonusYieldChanges
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_BonusYieldChanges as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_BonusYieldChanges
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Improvement_BonusYieldChanges as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_BonusYieldChanges
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Improvement_BonusYieldChanges as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_BonusYieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Improvement_BonusYieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_InvalidAdjacentFeatures
PropertyName: FeatureReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Improvement_InvalidAdjacentFeatures as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_InvalidAdjacentFeatures
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_InvalidAdjacentFeatures as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_Tourism
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_Tourism as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_Tourism
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Improvement_Tourism as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_Tourism
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Improvement_Tourism as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidAdjacentResources
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_ValidAdjacentResources as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidAdjacentResources
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Improvement_ValidAdjacentResources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidAdjacentTerrains
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_ValidAdjacentTerrains as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidAdjacentTerrains
PropertyName: TerrainReference
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Improvement_ValidAdjacentTerrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidBuildUnits
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Improvement_ValidBuildUnits as T2 on T2.UnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidFeatures
PropertyName: FeatureReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join Improvement_ValidFeatures as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidFeatures
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Improvement_ValidFeatures as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidFeatures
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Improvement_ValidFeatures as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidResources
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_ValidResources as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidResources
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Improvement_ValidResources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidTerrains
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_ValidTerrains as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidTerrains
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Improvement_ValidTerrains as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidTerrains
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Improvement_ValidTerrains as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_ValidTerrains
PropertyName: TerrainReference
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Improvement_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_YieldChanges
PropertyName: ImprovementReference
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Improvement_YieldChanges as T2 on T2.ImprovementType = T1.ImprovementType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Improvement_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Improvement_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Leaders
PropertyName: CivilizationCollection
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join CivilizationLeaders as T2 on T2.CivilizationType = T1.CivilizationType inner join Leaders as T3 on T3.LeaderType = T2.LeaderType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Leaders
PropertyName: InheritLeaderReference
TargetTable: Leaders
Query:
  SELECT T1.rowid from Leaders as T1 inner join Leaders as T2 on T2.InheritFrom = T1.LeaderType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Leaders
PropertyName: PreferredAgendaCollection
TargetTable: AgendaPreferredLeaders
Query:
  SELECT T1.rowid from AgendaPreferredLeaders as T1 inner join Leaders as T2 on T2.LeaderType = T1.LeaderType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Leaders
PropertyName: ReligionCollection
TargetTable: Religions
Query:
  SELECT T1.rowid from Religions as T1 inner join FavoredReligions as T2 on T2.ReligionType = T1.ReligionType inner join Leaders as T3 on T3.LeaderType = T2.LeaderType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Leaders
PropertyName: TraitCollection
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join LeaderTraits as T2 on T2.TraitType = T1.TraitType inner join Leaders as T3 on T3.LeaderType = T2.LeaderType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: MajorStartingUnits
PropertyName: DifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join MajorStartingUnits as T2 on T2.MinDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MajorStartingUnits
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join MajorStartingUnits as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MajorStartingUnits
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join MajorStartingUnits as T2 on T2.Unit = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Maps
PropertyName: GreatPersonClassesReference
TargetTable: Map_GreatPersonClasses
Query:
  SELECT T1.rowid from Map_GreatPersonClasses as T1 inner join Maps as T2 on T2.MapSizeType = T1.MapSizeType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Map_GreatPersonClasses
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join Map_GreatPersonClasses as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Map_GreatPersonClasses
PropertyName: MapSizeReference
TargetTable: Maps
Query:
  SELECT T1.rowid from Maps as T1 inner join Map_GreatPersonClasses as T2 on T2.MapSizeType = T1.MapSizeType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MutuallyExclusiveBuildings
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join MutuallyExclusiveBuildings as T2 on T2.Building = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MutuallyExclusiveBuildings
PropertyName: MutuallyExclusiveBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join MutuallyExclusiveBuildings as T2 on T2.MutuallyExclusiveBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MutuallyExclusiveDistricts
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join MutuallyExclusiveDistricts as T2 on T2.District = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: MutuallyExclusiveDistricts
PropertyName: MutuallyExclusiveDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join MutuallyExclusiveDistricts as T2 on T2.MutuallyExclusiveDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ObsoletePolicies
PropertyName: ObsoletePolicyReference
TargetTable: Policies
Query:
  SELECT T1.rowid from Policies as T1 inner join ObsoletePolicies as T2 on T2.ObsoletePolicy = T1.PolicyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ObsoletePolicies
PropertyName: PolicyReference
TargetTable: Policies
Query:
  SELECT T1.rowid from Policies as T1 inner join ObsoletePolicies as T2 on T2.PolicyType = T1.PolicyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ObsoletePolicies
PropertyName: RequiresAvailableGreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join ObsoletePolicies as T2 on T2.RequiresAvailableGreatPersonClass = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: OpTeamRequirements
PropertyName: AiTypeDependenceReference
TargetTable: UnitAiTypes
Query:
  SELECT T1.rowid from UnitAiTypes as T1 inner join OpTeamRequirements as T2 on T2.AiTypeDependence = T1.AiType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Policies
PropertyName: PolicyModifiers
TargetTable: PolicyModifiers
Query:
  SELECT T1.rowid from PolicyModifiers as T1 inner join Policies as T2 on T2.PolicyType = T1.PolicyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Policies
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Policies as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Policies
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Policies as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Policies
PropertyName: SlotReference
TargetTable: GovernmentSlots
Query:
  SELECT T1.rowid from GovernmentSlots as T1 inner join Policies as T2 on T2.GovernmentSlotType = T1.GovernmentSlotType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: AntecedantProjectCollectionReference
TargetTable: ProjectPrereqs
Query:
  SELECT T1.rowid from ProjectPrereqs as T1 inner join Projects as T2 on T2.ProjectType = T1.PrereqProjectType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Projects
PropertyName: GreatPersonPointsReference
TargetTable: Project_GreatPersonPoints
Query:
  SELECT T1.rowid from Project_GreatPersonPoints as T1 inner join Projects as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Projects
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Projects as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: PrereqDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Projects as T2 on T2.PrereqDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: PrereqProjectCollectionReference
TargetTable: ProjectPrereqs
Query:
  SELECT T1.rowid from ProjectPrereqs as T1 inner join Projects as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Projects
PropertyName: PrereqResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Projects as T2 on T2.PrereqResource = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Projects as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: RequiredBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Projects as T2 on T2.RequiredBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: VisualBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Projects as T2 on T2.VisualBuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects
PropertyName: YieldConversionsCollectionReference
TargetTable: Project_YieldConversions
Query:
  SELECT T1.rowid from Project_YieldConversions as T1 inner join Projects as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Project_GreatPersonPoints
PropertyName: GreatPersonClassReference
TargetTable: GreatPersonClasses
Query:
  SELECT T1.rowid from GreatPersonClasses as T1 inner join Project_GreatPersonPoints as T2 on T2.GreatPersonClassType = T1.GreatPersonClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_GreatPersonPoints
PropertyName: ProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Project_GreatPersonPoints as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_YieldConversions
PropertyName: ProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Project_YieldConversions as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_YieldConversions
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Project_YieldConversions as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ProjectPrereqs
PropertyName: PrereqProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join ProjectPrereqs as T2 on T2.PrereqProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ProjectPrereqs
PropertyName: ProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join ProjectPrereqs as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendas
PropertyName: AgendaReference
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join RandomAgendas as T2 on T2.AgendaType = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendas
PropertyName: LeaderCollection
TargetTable: Leaders
Query:
  SELECT T1.rowid from Leaders as T1 inner join AgendaPreferredLeaders as T2 on T2.LeaderType = T1.LeaderType inner join RandomAgendas as T3 on T3.AgendaType = T2.AgendaType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: Harvests
TargetTable: Resource_Harvests
Query:
  SELECT T1.rowid from Resource_Harvests as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: ImprovementAdjacentResourceCollection
TargetTable: Improvement_ValidAdjacentResources
Query:
  SELECT T1.rowid from Improvement_ValidAdjacentResources as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: ImprovementCollection
TargetTable: Improvement_ValidResources
Query:
  SELECT T1.rowid from Improvement_ValidResources as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Resources as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resources
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Resources as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resources
PropertyName: ResourceProjectCollection
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Resources as T2 on T2.ResourceType = T1.PrereqResource where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: StartBiasResourceCollection
TargetTable: StartBiasResources
Query:
  SELECT T1.rowid from StartBiasResources as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: StrategicUnitCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Resources as T2 on T2.ResourceType = T1.StrategicResource where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: TradeRouteYieldChanges
TargetTable: Resource_TradeRouteYields
Query:
  SELECT T1.rowid from Resource_TradeRouteYields as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: ValidTerrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join Resource_ValidTerrains as T2 on T2.TerrainType = T1.TerrainType inner join Resources as T3 on T3.ResourceType = T2.ResourceType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resources
PropertyName: YieldChangeCollection
TargetTable: Resource_YieldChanges
Query:
  SELECT T1.rowid from Resource_YieldChanges as T1 inner join Resources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resource_Conditions
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Resource_Conditions as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resource_Harvests
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Resource_Harvests as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resource_Harvests
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Resource_Harvests as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resource_TradeRouteYields
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Resource_TradeRouteYields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resource_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Resource_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Routes
PropertyName: PrereqEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Routes as T2 on T2.PrereqEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Routes
PropertyName: ValidBuildUnits
TargetTable: Route_ValidBuildUnits
Query:
  SELECT T1.rowid from Route_ValidBuildUnits as T1 inner join Routes as T2 on T2.RouteType = T1.RouteType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Route_ValidBuildUnits
PropertyName: RouteReference
TargetTable: Routes
Query:
  SELECT T1.rowid from Routes as T1 inner join Route_ValidBuildUnits as T2 on T2.RouteType = T1.RouteType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Route_ValidBuildUnits
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Route_ValidBuildUnits as T2 on T2.UnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: ScoringCategories
PropertyName: ScoringLineItemCollection
TargetTable: ScoringLineItems
Query:
  SELECT T1.rowid from ScoringLineItems as T1 inner join ScoringCategories as T2 on T2.CategoryType = T1.Category where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: ScoringLineItems
PropertyName: CategoryReference
TargetTable: ScoringCategories
Query:
  SELECT T1.rowid from ScoringCategories as T1 inner join ScoringLineItems as T2 on T2.Category = T1.CategoryType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasFeatures
PropertyName: CivilizationReference
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join StartBiasFeatures as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasFeatures
PropertyName: FeatureReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join StartBiasFeatures as T2 on T2.FeatureType = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasResources
PropertyName: CivilizationReference
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join StartBiasResources as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasResources
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join StartBiasResources as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasRivers
PropertyName: CivilizationReference
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join StartBiasRivers as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasTerrains
PropertyName: CivilizationReference
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join StartBiasTerrains as T2 on T2.CivilizationType = T1.CivilizationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartBiasTerrains
PropertyName: TerrainReference
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join StartBiasTerrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartEras
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartEras as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBoostedCivics
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join StartingBoostedCivics as T2 on T2.Civic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBoostedCivics
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartingBoostedCivics as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBoostedTechnologies
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartingBoostedTechnologies as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBoostedTechnologies
PropertyName: TechnologyReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join StartingBoostedTechnologies as T2 on T2.Technology = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBuildings
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join StartingBuildings as T2 on T2.Building = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBuildings
PropertyName: DifficultyReference
TargetTable: Difficulties
Query:
  SELECT T1.rowid from Difficulties as T1 inner join StartingBuildings as T2 on T2.MinDifficulty = T1.DifficultyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBuildings
PropertyName: DistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join StartingBuildings as T2 on T2.District = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingBuildings
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartingBuildings as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingCivics
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join StartingCivics as T2 on T2.Civic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingCivics
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartingCivics as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingGovernments
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join StartingGovernments as T2 on T2.Era = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StartingGovernments
PropertyName: GovernmentReference
TargetTable: Governments
Query:
  SELECT T1.rowid from Governments as T1 inner join StartingGovernments as T2 on T2.Government = T1.GovernmentType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Strategies
PropertyName: ConditionCollection
TargetTable: StrategyConditions
Query:
  SELECT T1.rowid from StrategyConditions as T1 inner join Strategies as T2 on T2.StrategyType = T1.StrategyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Strategies
PropertyName: PriorityCollection
TargetTable: Strategy_Priorities
Query:
  SELECT T1.rowid from Strategy_Priorities as T1 inner join Strategies as T2 on T2.StrategyType = T1.StrategyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Strategies
PropertyName: VictoryReference
TargetTable: Victories
Query:
  SELECT T1.rowid from Victories as T1 inner join Strategies as T2 on T2.VictoryType = T1.VictoryType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Strategies
PropertyName: YieldCollection
TargetTable: Strategy_YieldPriorities
Query:
  SELECT T1.rowid from Strategy_YieldPriorities as T1 inner join Strategies as T2 on T2.StrategyType = T1.StrategyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Strategy_YieldPriorities
PropertyName: PseudoYieldReference
TargetTable: PseudoYields
Query:
  SELECT T1.rowid from PseudoYields as T1 inner join Strategy_YieldPriorities as T2 on T2.PseudoYieldType = T1.PseudoYieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Strategy_YieldPriorities
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Strategy_YieldPriorities as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: StrategyConditions
PropertyName: StrategyReference
TargetTable: Strategies
Query:
  SELECT T1.rowid from Strategies as T1 inner join StrategyConditions as T2 on T2.StrategyType = T1.StrategyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Technologies
PropertyName: BoostCollectionReference
TargetTable: Boosts
Query:
  SELECT T1.rowid from Boosts as T1 inner join Technologies as T2 on T2.TechnologyType = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: BuildingCollectionReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: DistrictCollectionReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: EmbarkUnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Technologies as T2 on T2.EmbarkUnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Technologies
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Technologies as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Technologies
PropertyName: ImprovementCollection
TargetTable: Improvements
Query:
  SELECT T1.rowid from Improvements as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: ImprovementTourismCollection
TargetTable: Improvement_Tourism
Query:
  SELECT T1.rowid from Improvement_Tourism as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: MandatoryObsoleteTechCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Technologies as T2 on T2.TechnologyType = T1.MandatoryObsoleteTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: ObsoleteTechCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Technologies as T2 on T2.TechnologyType = T1.ObsoleteTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: PolicyCollection
TargetTable: Policies
Query:
  SELECT T1.rowid from Policies as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: PrereqTechCollection
TargetTable: TechnologyPrereqs
Query:
  SELECT T1.rowid from TechnologyPrereqs as T1 inner join Technologies as T2 on T2.TechnologyType = T1.Technology where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: ProjectCollection
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Technologies
PropertyName: UnitCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Technologies as T2 on T2.TechnologyType = T1.PrereqTech where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: TechnologyPrereqs
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join TechnologyPrereqs as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TechnologyPrereqs
PropertyName: TechnologyReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join TechnologyPrereqs as T2 on T2.Technology = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TechnologyRandomCosts
PropertyName: TechnologyReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join TechnologyRandomCosts as T2 on T2.TechnologyType = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Terrains
PropertyName: ImprovementAdjacentTerrainCollection
TargetTable: Improvement_ValidAdjacentTerrains
Query:
  SELECT T1.rowid from Improvement_ValidAdjacentTerrains as T1 inner join Terrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Terrains
PropertyName: ImprovementCollection
TargetTable: Improvement_ValidTerrains
Query:
  SELECT T1.rowid from Improvement_ValidTerrains as T1 inner join Terrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Terrains
PropertyName: StartBiasTerrainCollection
TargetTable: StartBiasTerrains
Query:
  SELECT T1.rowid from StartBiasTerrains as T1 inner join Terrains as T2 on T2.TerrainType = T1.TerrainType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Terrains
PropertyName: TerrainClasses
TargetTable: TerrainClasses
Query:
  SELECT T1.rowid from TerrainClasses as T1 inner join TerrainClass_Terrains as T2 on T2.TerrainClassType = T1.TerrainClassType inner join Terrains as T3 on T3.TerrainType = T2.TerrainType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Terrains
PropertyName: ValidResources
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Resource_ValidTerrains as T2 on T2.ResourceType = T1.ResourceType inner join Terrains as T3 on T3.TerrainType = T2.TerrainType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Terrain_YieldChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Terrain_YieldChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TerrainClasses
PropertyName: Terrains
TargetTable: Terrains
Query:
  SELECT T1.rowid from Terrains as T1 inner join TerrainClass_Terrains as T2 on T2.TerrainType = T1.TerrainType inner join TerrainClasses as T3 on T3.TerrainClassType = T2.TerrainClassType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Traits
PropertyName: ModifierCollection
TargetTable: TraitModifiers
Query:
  SELECT T1.rowid from TraitModifiers as T1 inner join Traits as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: TriggeredBehaviorTrees
PropertyName: EventReference
TargetTable: AiEvents
Query:
  SELECT T1.rowid from AiEvents as T1 inner join TriggeredBehaviorTrees as T2 on T2.AIEvent = T1.EventType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TriggeredBehaviorTrees
PropertyName: TreeReference
TargetTable: BehaviorTrees
Query:
  SELECT T1.rowid from BehaviorTrees as T1 inner join TriggeredBehaviorTrees as T2 on T2.TreeName = T1.TreeName where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TurnPhases
PropertyName: ActiveSegment
TargetTable: TurnSegments
Query:
  SELECT T1.rowid from TurnSegments as T1 inner join TurnPhases as T2 on T2.ActiveSegmentType = T1.TurnSegmentType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: TurnPhases
PropertyName: InactiveSegment
TargetTable: TurnSegments
Query:
  SELECT T1.rowid from TurnSegments as T1 inner join TurnPhases as T2 on T2.InactiveSegmentType = T1.TurnSegmentType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: AiInfoCollection
TargetTable: UnitAiInfos
Query:
  SELECT T1.rowid from UnitAiInfos as T1 inner join Units as T2 on T2.UnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: BaseUnitCollection
TargetTable: UnitUpgrades
Query:
  SELECT T1.rowid from UnitUpgrades as T1 inner join Units as T2 on T2.UnitType = T1.UpgradeUnit where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: BonusMinorStartingUnitCollection
TargetTable: BonusMinorStartingUnits
Query:
  SELECT T1.rowid from BonusMinorStartingUnits as T1 inner join Units as T2 on T2.UnitType = T1.Unit where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: CaptureCollection
TargetTable: UnitCaptures
Query:
  SELECT T1.rowid from UnitCaptures as T1 inner join Units as T2 on T2.UnitType = T1.CapturedUnitType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: MajorStartingUnitCollection
TargetTable: MajorStartingUnits
Query:
  SELECT T1.rowid from MajorStartingUnits as T1 inner join Units as T2 on T2.UnitType = T1.Unit where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: MandatoryObsoleteCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Units as T2 on T2.MandatoryObsoleteCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: MandatoryObsoleteTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Units as T2 on T2.MandatoryObsoleteTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: ObsoleteCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Units as T2 on T2.ObsoleteCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: ObsoleteTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Units as T2 on T2.ObsoleteTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: PrereqBuildingCollection
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Unit_BuildingPrereqs as T2 on T2.PrereqBuilding = T1.BuildingType inner join Units as T3 on T3.UnitType = T2.Unit where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join Units as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: PrereqDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join Units as T2 on T2.PrereqDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Units as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: PromotionClassReference
TargetTable: UnitPromotionClasses
Query:
  SELECT T1.rowid from UnitPromotionClasses as T1 inner join Units as T2 on T2.PromotionClass = T1.PromotionClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: PseudoYieldReference
TargetTable: PseudoYields
Query:
  SELECT T1.rowid from PseudoYields as T1 inner join Units as T2 on T2.PseudoYieldType = T1.PseudoYieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: ReplacedByCollection
TargetTable: UnitReplaces
Query:
  SELECT T1.rowid from UnitReplaces as T1 inner join Units as T2 on T2.UnitType = T1.ReplacesUnitType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: ReplacesCollection
TargetTable: UnitReplaces
Query:
  SELECT T1.rowid from UnitReplaces as T1 inner join Units as T2 on T2.UnitType = T1.CivUniqueUnitType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: StrategicResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Units as T2 on T2.StrategicResource = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: TraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join Units as T2 on T2.TraitType = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units
PropertyName: UpgradeUnitCollection
TargetTable: UnitUpgrades
Query:
  SELECT T1.rowid from UnitUpgrades as T1 inner join Units as T2 on T2.UnitType = T1.Unit where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Units
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Units as T2 on T2.PurchaseYield = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Unit_BuildingPrereqs
PropertyName: PrereqBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Unit_BuildingPrereqs as T2 on T2.PrereqBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Unit_BuildingPrereqs
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join Unit_BuildingPrereqs as T2 on T2.Unit = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitAbilities
PropertyName: UnitAbilityModifierCollection
TargetTable: UnitAbilityModifiers
Query:
  SELECT T1.rowid from UnitAbilityModifiers as T1 inner join UnitAbilities as T2 on T2.UnitAbilityType = T1.UnitAbilityType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: UnitAiInfos
PropertyName: UnitAiTypeReference
TargetTable: UnitAiTypes
Query:
  SELECT T1.rowid from UnitAiTypes as T1 inner join UnitAiInfos as T2 on T2.AiType = T1.AiType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitCaptures
PropertyName: BecomeUnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitCaptures as T2 on T2.BecomesUnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitCommands
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join UnitCommands as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitCommands
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join UnitCommands as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitOperations
PropertyName: PrereqCivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join UnitOperations as T2 on T2.PrereqCivic = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitOperations
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join UnitOperations as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitOperations
PropertyName: TargetDistrictReference
TargetTable: Districts
Query:
  SELECT T1.rowid from Districts as T1 inner join UnitOperations as T2 on T2.TargetDistrict = T1.DistrictType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitPromotions
PropertyName: PrereqUnitPromotionCollection
TargetTable: UnitPromotionPrereqs
Query:
  SELECT T1.rowid from UnitPromotionPrereqs as T1 inner join UnitPromotions as T2 on T2.UnitPromotionType = T1.UnitPromotion where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: UnitPromotions
PropertyName: PromotionClassReference
TargetTable: UnitPromotionClasses
Query:
  SELECT T1.rowid from UnitPromotionClasses as T1 inner join UnitPromotions as T2 on T2.PromotionClass = T1.PromotionClassType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitPromotionClasses
PropertyName: PromotionCollection
TargetTable: UnitPromotions
Query:
  SELECT T1.rowid from UnitPromotions as T1 inner join UnitPromotionClasses as T2 on T2.PromotionClassType = T1.PromotionClass where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: UnitPromotionClasses
PropertyName: UnitCollection
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitPromotionClasses as T2 on T2.PromotionClassType = T1.PromotionClass where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: UnitPromotionPrereqs
PropertyName: PrereqUnitPromotionReference
TargetTable: UnitPromotions
Query:
  SELECT T1.rowid from UnitPromotions as T1 inner join UnitPromotionPrereqs as T2 on T2.PrereqUnitPromotion = T1.UnitPromotionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitPromotionPrereqs
PropertyName: UnitPromotionReference
TargetTable: UnitPromotions
Query:
  SELECT T1.rowid from UnitPromotions as T1 inner join UnitPromotionPrereqs as T2 on T2.UnitPromotion = T1.UnitPromotionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitReplaces
PropertyName: BaseUnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitReplaces as T2 on T2.ReplacesUnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitReplaces
PropertyName: ReplacementUnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitReplaces as T2 on T2.CivUniqueUnitType = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitUpgrades
PropertyName: UnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitUpgrades as T2 on T2.Unit = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: UnitUpgrades
PropertyName: UpgradeUnitReference
TargetTable: Units
Query:
  SELECT T1.rowid from Units as T1 inner join UnitUpgrades as T2 on T2.UpgradeUnit = T1.UnitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Yields
PropertyName: FeatureChange_Refs
TargetTable: Feature_YieldChanges
Query:
  SELECT T1.rowid from Feature_YieldChanges as T1 inner join Yields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Yields
PropertyName: ImprovementChange_Refs
TargetTable: Improvement_BonusYieldChanges
Query:
  SELECT T1.rowid from Improvement_BonusYieldChanges as T1 inner join Yields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Yields
PropertyName: ResourceChange_Refs
TargetTable: Resource_YieldChanges
Query:
  SELECT T1.rowid from Resource_YieldChanges as T1 inner join Yields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Yields
PropertyName: TerrainChange_Refs
TargetTable: Terrain_YieldChanges
Query:
  SELECT T1.rowid from Terrain_YieldChanges as T1 inner join Yields as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: AgendaTags
PropertyName: RandomAgendaCollection
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join RandomAgendas_XP2 as T2 on T2.AgendaType = T1.AgendaType inner join AgendaTags as T3 on T3.AgendaTagType = T2.AgendaTag where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Alliances
PropertyName: ActionCollection
TargetTable: DiplomaticActions
Query:
  SELECT T1.rowid from DiplomaticActions as T1 inner join DiplomaticActions_XP1 as T2 on T2.DiplomaticActionType = T1.DiplomaticActionType inner join Alliances as T3 on T3.AllianceType = T2.AllianceType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Building_ResourceCosts
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_ResourceCosts as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_ResourceCosts
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Building_ResourceCosts as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_TourismBombs_XP2
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Building_TourismBombs_XP2 as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings_XP2
PropertyName: BuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Buildings_XP2 as T2 on T2.BuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Buildings_XP2
PropertyName: ResourceTypeConvertedToPowerReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Buildings_XP2 as T2 on T2.ResourceTypeConvertedToPower = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Building_YieldChangesBonusWithPower
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join Building_YieldChangesBonusWithPower as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CommemorationTypes
PropertyName: CommemorationCollection
TargetTable: CommemorationModifiers
Query:
  SELECT T1.rowid from CommemorationModifiers as T1 inner join CommemorationTypes as T2 on T2.CommemorationType = T1.CommemorationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: CommemorationTypes
PropertyName: ComplimentCollection
TargetTable: ComplimentModifiers
Query:
  SELECT T1.rowid from ComplimentModifiers as T1 inner join CommemorationTypes as T2 on T2.CommemorationType = T1.CommemorationType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: CommemorationTypes
PropertyName: MaximumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join CommemorationTypes as T2 on T2.MaximumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CommemorationTypes
PropertyName: MinimumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join CommemorationTypes as T2 on T2.MinimumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CongressAiChanges
PropertyName: DiscussionReference
TargetTable: Discussions
Query:
  SELECT T1.rowid from Discussions as T1 inner join CongressAiChanges as T2 on T2.DiscussionType = T1.DiscussionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CongressAiChanges
PropertyName: PseudoYieldReference
TargetTable: PseudoYields
Query:
  SELECT T1.rowid from PseudoYields as T1 inner join CongressAiChanges as T2 on T2.PseudoYieldType = T1.PseudoYieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CongressAiChanges
PropertyName: ResolutionReference
TargetTable: Resolutions
Query:
  SELECT T1.rowid from Resolutions as T1 inner join CongressAiChanges as T2 on T2.ResolutionType = T1.ResolutionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: CongressAiChanges
PropertyName: YieldReference
TargetTable: Yields
Query:
  SELECT T1.rowid from Yields as T1 inner join CongressAiChanges as T2 on T2.YieldType = T1.YieldType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions_XP1
PropertyName: AllianceReference
TargetTable: Alliances
Query:
  SELECT T1.rowid from Alliances as T1 inner join DiplomaticActions_XP1 as T2 on T2.AllianceType = T1.AllianceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticActions_XP1
PropertyName: RequiresGoldenAgeCommemorationTypeReference
TargetTable: CommemorationTypes
Query:
  SELECT T1.rowid from CommemorationTypes as T1 inner join DiplomaticActions_XP1 as T2 on T2.RequiresGoldenAgeCommemorationType = T1.CommemorationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: DiplomaticVisibilitySources_XP1
PropertyName: TradePostTraitReference
TargetTable: Traits
Query:
  SELECT T1.rowid from Traits as T1 inner join DiplomaticVisibilitySources_XP1 as T2 on T2.TradePostTrait = T1.TraitType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Discussions
PropertyName: AiChangeCollectionReference
TargetTable: CongressAiChanges
Query:
  SELECT T1.rowid from CongressAiChanges as T1 inner join Discussions as T2 on T2.DiscussionType = T1.DiscussionType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Discussions
PropertyName: EmergencyReference
TargetTable: EmergencyAlliances
Query:
  SELECT T1.rowid from EmergencyAlliances as T1 inner join Emergencies_XP2 as T2 on T2.EmergencyType = T1.EmergencyType inner join Discussions as T3 on T3.EmergencyType = T2.EmergencyType where T3.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: EmergencyAlliances
PropertyName: Effects
TargetTable: EmergencyBuffs
Query:
  SELECT T1.rowid from EmergencyBuffs as T1 inner join EmergencyAlliances as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: EmergencyAlliances
PropertyName: EmergencyTextBlock
TargetTable: EmergencyTexts
Query:
  SELECT T1.rowid from EmergencyTexts as T1 inner join EmergencyAlliances as T2 on T2.EmergencyText = T1.Type where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: EmergencyAlliances
PropertyName: GoalTextBlock
TargetTable: EmergencyGoalTexts
Query:
  SELECT T1.rowid from EmergencyGoalTexts as T1 inner join EmergencyAlliances as T2 on T2.GoalText = T1.GoalType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: EmergencyAlliances
PropertyName: Rewards
TargetTable: EmergencyRewards
Query:
  SELECT T1.rowid from EmergencyRewards as T1 inner join EmergencyAlliances as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Emergencies_XP2
PropertyName: DiscussionCollectionReference
TargetTable: Discussions
Query:
  SELECT T1.rowid from Discussions as T1 inner join Emergencies_XP2 as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Emergencies_XP2
PropertyName: EmergencyReference
TargetTable: EmergencyAlliances
Query:
  SELECT T1.rowid from EmergencyAlliances as T1 inner join Emergencies_XP2 as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Emergencies_XP2
PropertyName: ScoreSources
TargetTable: EmergencyScoreSources
Query:
  SELECT T1.rowid from EmergencyScoreSources as T1 inner join Emergencies_XP2 as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: EmergencyBuffs
PropertyName: EmergencyRef
TargetTable: EmergencyAlliances
Query:
  SELECT T1.rowid from EmergencyAlliances as T1 inner join EmergencyBuffs as T2 on T2.EmergencyType = T1.EmergencyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Governors
PropertyName: PromotionCollection
TargetTable: GovernorPromotions
Query:
  SELECT T1.rowid from GovernorPromotions as T1 inner join GovernorPromotionSets as T2 on T2.GovernorPromotion = T1.GovernorPromotionType inner join Governors as T3 on T3.GovernorType = T2.GovernorType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Governors
PropertyName: SecretSocietyCollection
TargetTable: SecretSocieties
Query:
  SELECT T1.rowid from SecretSocieties as T1 inner join Governors as T2 on T2.GovernorType = T1.GovernorType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GovernorPromotions
PropertyName: GovernorCollection
TargetTable: Governors
Query:
  SELECT T1.rowid from Governors as T1 inner join GovernorPromotionSets as T2 on T2.GovernorType = T1.GovernorType inner join GovernorPromotions as T3 on T3.GovernorPromotionType = T2.GovernorPromotion where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GovernorPromotions
PropertyName: PrereqGovernorPromotions
TargetTable: GovernorPromotions
Query:
  SELECT T1.rowid from GovernorPromotions as T1 inner join GovernorPromotionPrereqs as T2 on T2.PrereqGovernorPromotion = T1.GovernorPromotionType inner join GovernorPromotions as T3 on T3.GovernorPromotionType = T2.GovernorPromotionType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: GovernorPromotionConditions
PropertyName: EarliestGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join GovernorPromotionConditions as T2 on T2.EarliestGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GovernorPromotionModifiers
PropertyName: GovernorPromotionReference
TargetTable: GovernorPromotions
Query:
  SELECT T1.rowid from GovernorPromotions as T1 inner join GovernorPromotionModifiers as T2 on T2.GovernorPromotionType = T1.GovernorPromotionType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GovernorReplaces
PropertyName: BaseGovernorReference
TargetTable: Governors
Query:
  SELECT T1.rowid from Governors as T1 inner join GovernorReplaces as T2 on T2.ReplacesGovernorType = T1.GovernorType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: GovernorReplaces
PropertyName: ReplacementGovernorReference
TargetTable: Governors
Query:
  SELECT T1.rowid from Governors as T1 inner join GovernorReplaces as T2 on T2.UniqueGovernorType = T1.GovernorType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Moments
PropertyName: CommemorationReference
TargetTable: CommemorationTypes
Query:
  SELECT T1.rowid from CommemorationTypes as T1 inner join Moments as T2 on T2.CommemorationType = T1.CommemorationType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Moments
PropertyName: MaximumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Moments as T2 on T2.MaximumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Moments
PropertyName: MinimumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Moments as T2 on T2.MinimumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Moments
PropertyName: ObsoleteEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Moments as T2 on T2.ObsoleteEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedDeserts
PropertyName: DesertCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedDesertCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedDeserts as T3 on T3.NamedDesertType = T2.NamedDesertType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedDesertCivilizations
PropertyName: NamedDesertReference
TargetTable: NamedDeserts
Query:
  SELECT T1.rowid from NamedDeserts as T1 inner join NamedDesertCivilizations as T2 on T2.NamedDesertType = T1.NamedDesertType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedLakes
PropertyName: LakeCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedLakeCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedLakes as T3 on T3.NamedLakeType = T2.NamedLakeType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedLakeCivilizations
PropertyName: NamedLakeReference
TargetTable: NamedLakes
Query:
  SELECT T1.rowid from NamedLakes as T1 inner join NamedLakeCivilizations as T2 on T2.NamedLakeType = T1.NamedLakeType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedMountains
PropertyName: MountainCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedMountainCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedMountains as T3 on T3.NamedMountainType = T2.NamedMountainType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedMountainCivilizations
PropertyName: NamedMountainReference
TargetTable: NamedMountains
Query:
  SELECT T1.rowid from NamedMountains as T1 inner join NamedMountainCivilizations as T2 on T2.NamedMountainType = T1.NamedMountainType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedOceans
PropertyName: OceanCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedOceanCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedOceans as T3 on T3.NamedOceanType = T2.NamedOceanType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedOceanCivilizations
PropertyName: NamedOceanReference
TargetTable: NamedOceans
Query:
  SELECT T1.rowid from NamedOceans as T1 inner join NamedOceanCivilizations as T2 on T2.NamedOceanType = T1.NamedOceanType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedRivers
PropertyName: RiverCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedRiverCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedRivers as T3 on T3.NamedRiverType = T2.NamedRiverType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedRiverCivilizations
PropertyName: NamedRiverReference
TargetTable: NamedRivers
Query:
  SELECT T1.rowid from NamedRivers as T1 inner join NamedRiverCivilizations as T2 on T2.NamedRiverType = T1.NamedRiverType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedSeas
PropertyName: SeaCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedSeaCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedSeas as T3 on T3.NamedSeaType = T2.NamedSeaType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedSeaCivilizations
PropertyName: NamedSeaReference
TargetTable: NamedSeas
Query:
  SELECT T1.rowid from NamedSeas as T1 inner join NamedSeaCivilizations as T2 on T2.NamedSeaType = T1.NamedSeaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: NamedVolcanoes
PropertyName: VolcanoCivilizations
TargetTable: Civilizations
Query:
  SELECT T1.rowid from Civilizations as T1 inner join NamedVolcanoCivilizations as T2 on T2.CivilizationType = T1.CivilizationType inner join NamedVolcanoes as T3 on T3.NamedVolcanoType = T2.NamedVolcanoType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: NamedVolcanoCivilizations
PropertyName: NamedVolcanoReference
TargetTable: NamedVolcanoes
Query:
  SELECT T1.rowid from NamedVolcanoes as T1 inner join NamedVolcanoCivilizations as T2 on T2.NamedVolcanoType = T1.NamedVolcanoType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Policies_XP1
PropertyName: MaximumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Policies_XP1 as T2 on T2.MaximumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Policies_XP1
PropertyName: MinimumGameEraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join Policies_XP1 as T2 on T2.MinimumGameEra = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_BuildingCosts
PropertyName: ConsumedBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Project_BuildingCosts as T2 on T2.ConsumedBuildingType = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_BuildingCosts
PropertyName: ProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Project_BuildingCosts as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_ResourceCosts
PropertyName: ProjectReference
TargetTable: Projects
Query:
  SELECT T1.rowid from Projects as T1 inner join Project_ResourceCosts as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Project_ResourceCosts
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Project_ResourceCosts as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects_XP2
PropertyName: BuildingCostCollectionReference
TargetTable: Project_BuildingCosts
Query:
  SELECT T1.rowid from Project_BuildingCosts as T1 inner join Projects_XP2 as T2 on T2.ProjectType = T1.ProjectType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Projects_XP2
PropertyName: CreateBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Projects_XP2 as T2 on T2.CreateBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Projects_XP2
PropertyName: EmergencyScoreCollectionReference
TargetTable: EmergencyScoreSources
Query:
  SELECT T1.rowid from EmergencyScoreSources as T1 inner join Projects_XP2 as T2 on T2.ProjectType = T1.FromProject where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Projects_XP2
PropertyName: RequiredBuildingReference
TargetTable: Buildings
Query:
  SELECT T1.rowid from Buildings as T1 inner join Projects_XP2 as T2 on T2.RequiredBuilding = T1.BuildingType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendas_XP2
PropertyName: AgendaReference
TargetTable: Agendas
Query:
  SELECT T1.rowid from Agendas as T1 inner join RandomAgendas_XP2 as T2 on T2.AgendaType = T1.AgendaType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendas_XP2
PropertyName: RandomAgendaCollection
TargetTable: RandomAgendas
Query:
  SELECT T1.rowid from RandomAgendas as T1 inner join Agendas as T2 on T2.AgendaType = T1.AgendaType inner join RandomAgendas_XP2 as T3 on T3.AgendaType = T2.AgendaType where T3.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomAgendasForCivic
PropertyName: AgendaTagCollection
TargetTable: AgendaTags
Query:
  SELECT T1.rowid from AgendaTags as T1 inner join RandomAgendaCivicTags as T2 on T2.AgendaTag = T1.AgendaTagType inner join Civics as T3 on T3.CivicType = T2.CivicType inner join RandomAgendasForCivic as T4 on T4.CivicType = T3.CivicType where T4.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomAgendasForCivic
PropertyName: CivicReference
TargetTable: Civics
Query:
  SELECT T1.rowid from Civics as T1 inner join RandomAgendasForCivic as T2 on T2.CivicType = T1.CivicType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendasForCivic
PropertyName: VisibilityReference
TargetTable: Visibilities
Query:
  SELECT T1.rowid from Visibilities as T1 inner join RandomAgendasForCivic as T2 on T2.VisibilityType = T1.VisibilityType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendasInEra
PropertyName: AgendaTagCollection
TargetTable: AgendaTags
Query:
  SELECT T1.rowid from AgendaTags as T1 inner join RandomAgendaEraTags as T2 on T2.AgendaTag = T1.AgendaTagType inner join Eras as T3 on T3.EraType = T2.EraType inner join RandomAgendasInEra as T4 on T4.EraType = T3.EraType where T4.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomAgendasInEra
PropertyName: EraReference
TargetTable: Eras
Query:
  SELECT T1.rowid from Eras as T1 inner join RandomAgendasInEra as T2 on T2.EraType = T1.EraType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomAgendasInEra
PropertyName: VisibilityReference
TargetTable: Visibilities
Query:
  SELECT T1.rowid from Visibilities as T1 inner join RandomAgendasInEra as T2 on T2.VisibilityType = T1.VisibilityType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomEvents
PropertyName: DamageCollection
TargetTable: RandomEvent_Damages
Query:
  SELECT T1.rowid from RandomEvent_Damages as T1 inner join RandomEvents as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomEvents
PropertyName: FrequencyCollection
TargetTable: RandomEvent_Frequencies
Query:
  SELECT T1.rowid from RandomEvent_Frequencies as T1 inner join RandomEvents as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomEvents
PropertyName: NaturalWonderReference
TargetTable: Features
Query:
  SELECT T1.rowid from Features as T1 inner join RandomEvents as T2 on T2.NaturalWonder = T1.FeatureType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: RandomEvents
PropertyName: PillagedImprovementCollection
TargetTable: RandomEvent_PillagedImprovements
Query:
  SELECT T1.rowid from RandomEvent_PillagedImprovements as T1 inner join RandomEvents as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomEvents
PropertyName: TerrainCollection
TargetTable: RandomEvent_Terrains
Query:
  SELECT T1.rowid from RandomEvent_Terrains as T1 inner join RandomEvents as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomEvents
PropertyName: YieldCollection
TargetTable: RandomEvent_Yields
Query:
  SELECT T1.rowid from RandomEvent_Yields as T1 inner join RandomEvents as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: RandomEvent_Damages
PropertyName: RandomEventReference
TargetTable: RandomEvents
Query:
  SELECT T1.rowid from RandomEvents as T1 inner join RandomEvent_Damages as T2 on T2.RandomEventType = T1.RandomEventType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resolutions
PropertyName: AiChangeCollectionReference
TargetTable: CongressAiChanges
Query:
  SELECT T1.rowid from CongressAiChanges as T1 inner join Resolutions as T2 on T2.ResolutionType = T1.ResolutionType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resolutions
PropertyName: Effects
TargetTable: ResolutionEffects
Query:
  SELECT T1.rowid from ResolutionEffects as T1 inner join Resolutions as T2 on T2.ResolutionType = T1.ResolutionType where T2.rowid = ? ORDER BY T1.rowid ASC


BaseTable: Resource_Consumption
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Resource_Consumption as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Resource_Consumption
PropertyName: TechnologyReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Resource_Consumption as T2 on T2.ObsoleteTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Route_ResourceCosts
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Route_ResourceCosts as T2 on T2.ResourceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Route_ResourceCosts
PropertyName: RouteReference
TargetTable: Routes
Query:
  SELECT T1.rowid from Routes as T1 inner join Route_ResourceCosts as T2 on T2.RouteType = T1.RouteType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Routes_XP2
PropertyName: PrereqTechReference
TargetTable: Technologies
Query:
  SELECT T1.rowid from Technologies as T1 inner join Routes_XP2 as T2 on T2.PrereqTech = T1.TechnologyType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Routes_XP2
PropertyName: RouteReference
TargetTable: Routes
Query:
  SELECT T1.rowid from Routes as T1 inner join Routes_XP2 as T2 on T2.RouteType = T1.RouteType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: SecretSocieties
PropertyName: GovernorReference
TargetTable: Governors
Query:
  SELECT T1.rowid from Governors as T1 inner join SecretSocieties as T2 on T2.GovernorType = T1.GovernorType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


BaseTable: Units_XP2
PropertyName: ResourceReference
TargetTable: Resources
Query:
  SELECT T1.rowid from Resources as T1 inner join Units_XP2 as T2 on T2.ResourceMaintenanceType = T1.ResourceType where T2.rowid = ? ORDER BY T1.rowid ASC LIMIT 1


# CivilopediaPageGroupQueries

SectionId: BUILDINGS
PageGroupIdColumn: PageGroupId
NameColumn: Name
TooltipColumn: Tooltip
VisibleIfEmptyColumn: VisibleIfEmpty
SortIndexColumn: SortIndex
SQL:
  SELECT DistrictType as PageGroupId, Name, Description as Tooltip, 0 as VisibleIfEmpty, 0 as SortIndex from Districts


SectionId: CIVICS
PageGroupIdColumn: PageGroupId
NameColumn: Name
TooltipColumn: Tooltip
VisibleIfEmptyColumn: VisibleIfEmpty
SortIndexColumn: SortIndex
SQL:
  SELECT EraType as PageGroupId, Name, Description as Tooltip, 1 as VisibleIfEmpty, ChronologyIndex as SortIndex from Eras


SectionId: GREATPEOPLE
PageGroupIdColumn: PageGroupId
NameColumn: Name
TooltipColumn: Tooltip
VisibleIfEmptyColumn: VisibleIfEmpty
SortIndexColumn: SortIndex
SQL:
  SELECT GreatPersonClassType as PageGroupId, Name, null as Tooltip, 1 as VisibleIfEmpty, 0 as SortIndex from GreatPersonClasses


SectionId: UNITS
PageGroupIdColumn: PageGroupId
NameColumn: Name
TooltipColumn: Tooltip
VisibleIfEmptyColumn: VisibleIfEmpty
SortIndexColumn: SortIndex
SQL:
  SELECT FormationClassType as PageGroupId, Name, null as Tooltip, 1 as VisibleIfEmpty, 0 as SortIndex from UnitFormationClasses


SectionId: UNITPROMOTIONS
PageGroupIdColumn: PageGroupId
NameColumn: Name
TooltipColumn: Tooltip
VisibleIfEmptyColumn: VisibleIfEmpty
SortIndexColumn: SortIndex
SQL:
  SELECT PromotionClassType as PageGroupId, Name, null as Tooltip, 1 as VisibleIfEmpty, 0 as SortIndex from UnitPromotionClasses


SectionId: GOVERNORS
PageGroupIdColumn: PageGroupId
NameColumn: Name
SQL:
  SELECT GovernorType AS PageGroupId, printf("{LOC_PEDIA_GOVERNORS_PAGEGROUP_PROMOTIONS_NAME << {%s}}",ShortTitle) AS Name FROM Governors


# CivilopediaPageQueries

SectionId: LEADERS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT distinct Leaders.LeaderType AS PageId, null AS PageGroupId, "Leader" AS PageLayoutId, Leaders.Name, null AS Tooltip FROM Leaders INNER JOIN CivilizationLeaders on CivilizationLeaders.LeaderType = Leaders.LeaderType INNER JOIN Civilizations ON CivilizationLeaders.CivilizationType = Civilizations.CivilizationType WHERE Civilizations.StartingCivilizationLevelType = "CIVILIZATION_LEVEL_FULL_CIV"


SectionId: CITYSTATES
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT CivilizationType as PageId, TypeProperties.Value as PageGroupId, "CityState" as PageLayoutId, Civilizations.Name as Name, null as Tooltip FROM Civilizations inner join TypeProperties on Civilizations.CivilizationType = TypeProperties.Type where StartingCivilizationLevelType = "CIVILIZATION_LEVEL_CITY_STATE" and TypeProperties.Name = "CityStateCategory"


SectionId: DISTRICTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT DistrictType as PageId, null as PageGroupId, "District" as PageLayoutId, Name, null as Tooltip FROM Districts where InternalOnly = 0


SectionId: BUILDINGS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT BuildingType as PageId, PreReqDistrict as PageGroupId, "Building" as PageLayoutId, Name, null as Tooltip FROM Buildings Where IsWonder = 0 AND InternalOnly = 0


SectionId: WONDERS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT BuildingType as PageId, "Wonders" as PageGroupId, "Building" as PageLayoutId, Name, null as Tooltip FROM Buildings Where IsWonder = 1 AND InternalOnly = 0


SectionId: WONDERS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT ProjectType as PageId, "Projects" as PageGroupId, "Project" as PageLayoutId, ShortName as Name, null as Tooltip FROM Projects


SectionId: UNITS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT UnitType as PageId, FormationClass as PageGroupId, "Unit" as PageLayoutId, Name, null as Tooltip FROM Units where TraitType is null or TraitType <> "TRAIT_BARBARIAN"


SectionId: UNITPROMOTIONS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT UnitPromotionType as PageId, PromotionClass as PageGroupId, "UnitPromotion" as PageLayoutId, Name, null as Tooltip FROM UnitPromotions


SectionId: GREATPEOPLE
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT GreatPersonIndividualType as PageId, GreatPersonClassType as PageGroupId, "GreatPerson" as PageLayoutId, Name, null as Tooltip FROM GreatPersonIndividuals


SectionId: TECHNOLOGIES
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT TechnologyType as PageId, EraType as PageGroupId, "Technology" as PageLayoutId, Name, null as Tooltip FROM Technologies


SectionId: CIVICS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT CivicType as PageId, EraType as PageGroupId, "Civic" as PageLayoutId, Name, null as Tooltip FROM Civics


SectionId: RELIGIONS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT ReligionType as PageId, "Religion" as PageGroupId, "Religion" as PageLayoutId, Name, null as Tooltip FROM Religions WHERE Pantheon = 0 and RequiresCustomName = 0


SectionId: RELIGIONS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT BeliefType as PageId, BeliefClassType as PageGroupId, "Belief" as PageLayoutId, Name, null as Tooltip FROM Beliefs


SectionId: FEATURES
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT TerrainType as PageId, "Terrain" as PageGroupId, "Terrain" as PageLayoutId, Name, null as Tooltip FROM Terrains where Mountain = 0 and TerrainType <> "TERRAIN_OUTOFPLAY"


SectionId: FEATURES
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT FeatureType as PageId, CASE WHEN NaturalWonder=0 THEN "Feature" ELSE "Wonder" END as PageGroupId, "Feature" as PageLayoutId, Name, null as Tooltip FROM Features


SectionId: RESOURCES
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT ResourceType as PageId, ResourceClassType as PageGroupId, "Resource" as PageLayoutId, Name, null as Tooltip FROM Resources


SectionId: IMPROVEMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT ImprovementType as PageId, "Improvements" as PageGroupId, "Improvement" as PageLayoutId, Name, null as Tooltip FROM Improvements Where BarbarianCamp = 0 and Goody = 0


SectionId: IMPROVEMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT RouteType as PageId, "Routes" as PageGroupId, "Route" as PageLayoutId, Name, null as Tooltip FROM Routes


SectionId: CIVILIZATIONS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT CivilizationType as PageId, "CIVILIZATIONS" as PageGroupId, "Civilization" as PageLayoutId, Name, null as Tooltip FROM Civilizations where StartingCivilizationLevelType = "CIVILIZATION_LEVEL_FULL_CIV"


SectionId: CIVILIZATIONS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
TextKeyPrefixColumn: TextKeyPrefix
SQL:
  SELECT distinct Leaders.LeaderType AS PageId, "LEADERS" AS PageGroupId, "Leader" AS PageLayoutId, Leaders.Name, null AS Tooltip, "LOC_PEDIA_LEADERS_PAGE" as TextKeyPrefix FROM Leaders INNER JOIN CivilizationLeaders on CivilizationLeaders.LeaderType = Leaders.LeaderType INNER JOIN Civilizations ON CivilizationLeaders.CivilizationType = Civilizations.CivilizationType WHERE Civilizations.StartingCivilizationLevelType = "CIVILIZATION_LEVEL_FULL_CIV"


SectionId: GOVERNMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT GovernmentType as PageId, "Government" as PageGroupId, "Government" as PageLayoutId, Name, null as Tooltip FROM Governments


SectionId: GOVERNMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT Policies.PolicyType as PageId, GovernmentSlotType as PageGroupId, "Policy" as PageLayoutId, Name, null as Tooltip FROM Policies LEFT OUTER JOIN Policies_XP1 on Policies.PolicyType = Policies_XP1.PolicyType WHERE Policies_XP1.RequiresDarkAge IS NULL or Policies_XP1.RequiresDarkAge <> 1


SectionId: GOVERNMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT Policies.PolicyType as PageId, "DARK_POLICIES" as PageGroupId, "Policy" as PageLayoutId, Name, null as Tooltip FROM Policies LEFT OUTER JOIN Policies_XP1 on Policies.PolicyType = Policies_XP1.PolicyType WHERE Policies_XP1.RequiresDarkAge = 1


SectionId: GOVERNORS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT GovernorType as PageId, "GOVERNORS" as PageGroupId, 'Governor' as PageLayoutId, printf("{%s} ({%s})", Name, ShortTitle) as Name, null as Tooltip FROM Governors


SectionId: GOVERNORS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SortIndexColumn: SortIndex
SQL:
  SELECT GovernorPromotionType as PageId, GovernorType as PageGroupId, 'GovernorPromotion' as PageLayoutId, Name, null as Tooltip, Level as SortIndex FROM GovernorPromotions inner join GovernorPromotionSets on GovernorPromotions.GovernorPromotionType = GovernorPromotionSets.GovernorPromotion


SectionId: MOMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT MomentType AS PageId, "MAJOR" AS PageGroupId, 'HistoricMoment' AS PageLayoutId, Name, null AS Tooltip FROM Moments WHERE InterestLevel >= 2


SectionId: MOMENTS
PageIdColumn: PageId
PageGroupIdColumn: PageGroupId
PageLayoutIdColumn: PageLayoutId
NameColumn: Name
TooltipColumn: Tooltip
SQL:
  SELECT MomentType AS PageId, "MINOR" AS PageGroupId, 'HistoricMoment' AS PageLayoutId, Name, null AS Tooltip FROM Moments WHERE InterestLevel < 2


# GameEffects

Type: COLLECTION_OWNER_CITY
ContextInterfaces: {DE7BB784-1E7F-4245-95D5-517202F0CB64}
Description:
  A city object that is inferred from the owner rather than the owner itself.  Useful when stacking limitations are necessary.


Type: COLLECTION_OWNER_PLAYER
ContextInterfaces: {3BCA4C49-F422-44AE-8A10-857B3ECEFD3A}
Description:
  A player object that is inferred from the owner rather than the owner itself.  Useful when stacking limitations are necessary.


Type: COLLECTION_OWNER_UNIT
ContextInterfaces: {B3DF7354-0054-4FA5-9423-324C7704DA9F}
Description:
  A unit object that is inferred from the owner rather than the owner itself.  Useful when stacking limitations are necessary.


Type: EFFECT_ADJUST_GOVERNOR_IDENTITY_PRESSURE
CommonName: AdjustGovernorIdentityPressure
SubjectInterfaces: {C58ED836-370A-4E08-8A5B-0323B631B4B6}
Description:
  Game Effect for adjusting the external domestic and foreign identity pressure strengths of a Governor.


Type: EFFECT_ADJUST_GLOBAL_WMD_STOCKPILE
CommonName: AdjustGlobalWMDStockpile
SubjectInterfaces: {B3DF7354-0054-4FA5-9423-324C7704DA9F}
Description:
  Game Effect for adjusting the number of WMDs for players in the game, primarily as a result of a World Congress resolution. If TargetOnly is set to true, effect only applies to the target player. If false, effect applies to all players based on the number of WMDs the target player has.


Type: EFFECT_ADJUST_PLAYER_GOVERNOR_FAVOR
CommonName: AdjustGovernorUseFavor
SubjectInterfaces: {3BCA4C49-F422-44AE-8A10-857B3ECEFD3A}
Description:
  Game Effect for granting Favor through promoting the specified governor type OR neutralizing all governors of the specified type


Type: EFFECT_ADJUST_PLAYER_BUFF_UNIT_PRODUCTION_YIELD
CommonName: AdjustPlayerBuffUnitProductionYield
Description:
  Game Effect for reducing the cost when producing units with the specified production yield type (Production, Gold, or Faith)


Type: EFFECT_ADJUST_PLAYER_RESOURCE_ACCUMULATION_MODIFIER
CommonName: AdjustPlayerResourceAccumulationModifier
SubjectInterfaces: {3BCA4C49-F422-44AE-8A10-857B3ECEFD3A}
Description:
  Game Effect for adjusting the number of extra resources extracted by a player each turn. If no resource type is specified, the modifier applies to all accumulative resources.


Type: REQUIREMENT_CITY_HAS_X_SPECIALTY_DISTRICTS
Description:
  Checks the number of functioning (not pillaged) specialty districts a city contains is greater than or equal the provided amount.


Type: REQUIREMENT_PLOT_UNIT_CITY_HAS_ANY_DISTRICT
SubjectInterfaces: {B653A88B-121D-43AF-8917-2EADA2D39F84}
Description:
  Test if a plot has any active district. NOTE: This requirement will eventually be removed as it is a duplicate of REQUIREMENT_PLOT_HAS_ANY_DISTRICT.


Type: REQUIREMENT_PLOT_UNIT_CITY_HAS_DISTRICT_SAME_OWNER
SubjectInterfaces: {B653A88B-121D-43AF-8917-2EADA2D39F84},{B3DF7354-0054-4FA5-9423-324C7704DA9F}
Description:
  Test a unit's current plot is owned by a city that contains the provided district (or suitable replacement) with the same owner as the unit.


Type: REQUIREMENT_TEAM_DIPLOMATIC_VICTORY
CommonName: TeamDiplomaticVictory
SubjectInterfaces: {211EBD46-7DBA-4F44-83D8-2CE4C700D569}
Description:
  Diplomatic victory is determined if any player in the team has obtained 'DIPLOMATIC_VICTORY_POINTS_REQUIRED' points.


# GameEffectArguments

Type: REQUIREMENT_PLAYER_DEFAULT_DEFEAT
Name: UnitType
ArgumentType: database
DefaultValue: UNIT_SETTLER
DatabaseKind: KIND_UNIT
Description:
  If defined, the player must possess at least 1 'UnitType' or (if IgnoreCities is false) the player must possess at least one city.


# ModifierArguments

ModifierId: AGENDA_FLOWER_OF_SCOTLAND_BAN_WARS
Name: Action
Type: ARGTYPE_IDENTITY
Value:
  DIPLOACTION_DECLARE_SURPRISE_WAR, DIPLOACTION_DECLARE_FORMAL_WAR, DIPLOACTION_DECLARE_HOLY_WAR, DIPLOACTION_DECLARE_LIBERATION_WAR, DIPLOACTION_DECLARE_RECONQUEST_WAR, DIPLOACTION_DECLARE_PROTECTORATE_WAR, DIPLOACTION_DECLARE_COLONIAL_WAR, DIPLOACTION_DECLARE_TERRITORIAL_WAR


# ModifierStrings

ModifierId: ALPINE_TRAINING_COMBAT_HILLS
Context: Preview
Text:
  {LOC_ABILITY_ALPINE_TRAINING_COMBAT_HILLS_MODIFIER_DESCRIPTION} {LOC_WONDER_DESCRIPTOR_PREVIEW_TEXT}


# NodeDefinitions

NodeType: Concurrent
Description:
  Logical And node. Runs all children until it reaches a FAILURE (can allow multiple failures if desired.)


NodeType: Sequence
Description:
  Special logical And node. Stops on FAILURE, but also stops on RUNNING. Resumes next turn on RUNNING node.


NodeType: Build Unit
Description:
  Given a list of units and/or buildings and a city, builds 'best' unit at the city when queue is availble.


NodeType: Run Behavior Tree
Description:
  DEPRECATED - DO NOT USE. Runs a behavior tree defined elsewhere. You can change data for that sub-tree, but not its structure.


NodeType: Decode Trigger
Description:
  For temporary trees only. Take the trigger you want to meet and extract information for use elsewhere.


NodeType: Choose City
Description:
  Given a list of buildings, pick the best city to make a building. Output city and needed improvement.


NodeType: Move Unit
Description:
  Given a unit ID and a location, give the unit a move order. Report RUNNING until it reaches destination.


NodeType: Choose Improvement
Description:
  Given a list of improvement types, chooses a specific improvement to build, preferably around a city


NodeType: In Difficulty Range
Description:
  Decorator that runs if owner's difficulty is within range. Optionally target difficulty, optionally fail if outside.


NodeType: Check Plot
Description:
  Checks if you can build the requested building or district on that location. Outputs an offending resource or feature if it fails


NodeType: Can Alpha City
Description:
  For shortcutting a city attack. Check if you can do 50%+ garrison damage or defense units are worth ignoring.


NodeType: Is Near Fallout
Description:
  Returns true if any unit is within range of fallout and puts all such members in the Endangered list (if there is an operation)


# ShapeDefinitions

ShapeName: Selector Nodes
Description:
  Selector nodes have one or more children and run through them until meeting some condition or completing them all


ShapeName: Decision Nodes
Description:
  Decision nodes can never return running, and can output data to be used by other behavior tree nodes


