Site structure

SELECT facilities.siteName,
    facilities.siteInspireId,
    facilities.facilityInspireId,
    installations.installationInspireId,
    lcps.lcpInspireId
FROM [IED].[latest].[Browse6Header] as facilities
LEFT JOIN [IED].[latest].[Browse8Header] as installations
    ON facilities.facilityInspireId = installations.facilityInspireId
    AND facilities.euregReportingYear = installations.euregReportingYear
LEFT JOIN [IED].[latest].[Browse10_Header] as lcps
    ON installations.installationInspireId = lcps.installationInspireId
    AND installations.euregReportingYear = lcps.euregReportingYear
GROUP BY facilities.siteName,
    facilities.siteInspireId,
    facilities.facilityInspireId,
    installations.installationInspireId,
    lcps.lcpInspireId

No data