Link em SQL Problem of logic between doers

Here is a logic problem that follows:

A: Main key
B: chave estrangeira
C: Chave estrangeira

Coluna A = [A,B]
Coluna B = [B,C]

What is the problem? Something gives coluna A equal to Coluna B, that is, it returns me C. Assim, fazendo or link A -> C.

Meu Code is abaixo

SELECT DIFFERENT
incident_sla.dv_inc_number AS number
incident_sla.dv_inc_assignment_group AS Assignment_Group,
cmn_location.dv_u_jnj_unique_id AS Unique_ID,
cmn_location.dv_u_site AS Site,
cmn_location.dv_u_region AS CI_Region,
cmn_location.dv_u_country AS CI_Country,
cmn_location.dv_street AS Street,
incident_sla.dv_inc_opened_at AS Opened,
incident_sla.dv_inc_u_state AS State,
incident_sla.dv_inc_priority AS Priority,
incident_sla.dv_inc_assigned_to AS ASigned_to,
incident_sla.dv_inc_u_resolved_at AS Resolved,
–incident_sla.dv_taskslatable_stage AS Stage,
incident_sla.dv_inc_cmdb_ci AS Configuration_item,
netgear.device_type AS Device,
RELATION.dv_parent AS A FATHER,
RELATION.dv_child AS A PORT,
–circuit.name AS CIRCUIT,
–circuit.dv_u_ixc_provider_a AS Carrier,
–circuit.dv_operational_status,
incident_sla.dv_inc_location AS Caller_Region,
incident_sla.inc_contact_type AS Ticket_Source,
incident_sla.dv_inc_short_description AS Short_Description,
incident_sla.dv_inc_close_notes AS Resolution_Notes,
incident_sla.dv_inc_u_resolution_bucket,
incident_sla.dv_inc_u_resolution_category

FROM servicenow_stg.incident_sla incident_sla

JOIN THE LEFT servicenow_stg.cmdb_ci_netgear netgear ON netgear.sys_id = incident_sla.inc_cmdb_ci
JOIN THE LEFT servicenow_stg.cmdb_rel_ci RELATION ON RELATION.parent = netgear.sys_id
JOIN THE LEFT servicenow_stg.cmdb_rel_ci RELATION2 ON RELATION2.dv_child = RELATION.dv_parent
–WHEN RELATION2.dv_parent = RELATION.dv_child RETURN (RELATION2.dv_child) – ERRO NESSA FUNÇÃO
circuit.dv_u_location_a_site_id = netgear.dv_location
LEFT JOIN servicenow_stg.cmn_location cmn_location ON cmn_location.sys_id = netgear.Location

WHERE
cmn_location.dv_u_region IN (& # 39; LA & # 39 ;, & # 39; LATAM & # 39;)
AND incident_sla.dv_inc_opened_at LIKE & # 39; 2018% & # 39;
AND incident_sla.inc_contact_type = & # 39; Event Management & # 39;
– AND circuit.dv_subcategory = & # 39; Data & # 39;
And netgear.device_type = & # 39; router & # 39;
Y
(
incident_sla.dv_inc_assignment_group like & # 39; CONTACT CENTER APPS TIER% & # 39;
O incident_sla.dv_inc_assignment_group = & # 39; IP ADDRESS MGT L1 & # 39;
Or incident_sla.dv_inc_assignment_group as & # 39; NETWORK% TIER% & # 39;
Or incident_sla.dv_inc_assignment_group like & # 39; WIRELESS TIER% & # 39;
)