Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Created March 22, 2014 11:29
Show Gist options
  • Save jlogsdon/9705619 to your computer and use it in GitHub Desktop.
Save jlogsdon/9705619 to your computer and use it in GitHub Desktop.
SELECT
"structures"."id", "structures"."type", "structures"."scan_link", "structures"."notes", "structures"."updated_at",
"regions"."id" AS region_id, "regions"."name" AS region_name,
"constellations"."id" AS constellation_id, "constellations"."name" AS constellation_name,
"solar_systems"."id" AS solar_system_id, "solar_systems"."name" AS solar_system_name,
"planets"."id" AS planet_id, "planets"."idx" AS planet_idx,
"moons"."id" AS moon_id, "moons"."idx" AS moon_idx,
"alliances"."id" AS alliance_id, "alliances"."ticker" AS alliance_ticker, "alliances"."friendly" AS alliance_friendly,
"corporations"."id" AS corporation_id, "corporations"."ticker" AS corporation_ticker, "corporations"."friendly" AS corporation_friendly
FROM "structures"
INNER JOIN "regions" ON "regions"."id" = "structures"."region_id"
INNER JOIN "constellations" ON "constellations"."id" = "structures"."constellation_id"
INNER JOIN "solar_systems" ON "solar_systems"."id" = "structures"."solar_system_id"
INNER JOIN "planets" ON "planets"."id" = "structures"."planet_id"
INNER JOIN "moons" ON "moons"."id" = "structures"."moon_id"
INNER JOIN "alliances" ON "alliances"."id" = "structures"."alliance_id"
INNER JOIN "corporations" ON "corporations"."id" = "structures"."corporation_id"
WHERE "structures"."region_id" = 10000015;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment