-- Shows codes for a game
SELECT `code_lookup`.`code`, `code_lookup`.`type`, `code_lookup`.`location_id`, `locations`.`internal_note`, `locations`.`is_start`, `locations`.`is_end` FROM `code_lookup` LEFT OUTER JOIN `locations` ON `code_lookup`.`game_id` = `locations`.`game_id` AND `code_lookup`.`location_id` = `locations`.`location_id` WHERE `code_lookup`.`game_id` = 1;

-- Shows codes for a game
SELECT `code_lookup`.`code`, `code_lookup`.`type`, `code_lookup`.`location_id`, `locations`.`internal_note`, `locations`.`is_start`, `locations`.`is_end` FROM `code_lookup` LEFT OUTER JOIN `locations` ON `code_lookup`.`game_id` = `locations`.`game_id` AND `code_lookup`.`location_id` = `locations`.`location_id` WHERE `code_lookup`.`game_id` = 1;

-- Shows codes and clusters for locations
SELECT `locations`.`location_id`, `locations`.`internal_note`, `code_lookup`.`code`, `game_location_clusters`.`cluster_id`, `game_location_clusters`.`description` FROM `locations` LEFT OUTER JOIN `code_lookup` ON `locations`.`game_id` = `code_lookup`.`game_id` AND `locations`.`location_id` = `code_lookup`.`location_id` LEFT OUTER JOIN `game_location_clusters` ON `game_location_clusters`.`game_id` = `locations`.`game_id` AND `game_location_clusters`.`cluster_id` = `locations`.`cluster_id` WHERE `locations`.`game_id` = 1 ORDER BY `game_location_clusters`.`cluster_id` ASC, `locations`.`location_id` ASC

Add new location and code query
Add new location and code query

