select distinct b.store_irn , '<a href="Main.aspx?evt=2048001&documentID=8259143A4C918098E4DAE397F7B89CDD&elementsProm ptAnswers={&[Store1]@GUID};{&[Store1]@ElementID}&hiddenSections=header,dockTop,dockLeft,foot er,path">' || a.dist_name || '</a>' as Orgs_url from tr_district a, tr_store b where a.store_irn=b.store_irn union select distinct b.store_irn, '<a href="Main.aspx?evt=2048001&documentID=600CF9564A75F15858AAE1B502F499AC&elementsPromp tAnswers={&[Store2]@GUID};{&[Store2]@ElementID}&hiddenSections=header,dockTop,dockLeft,footer ,path">' || a.org_name || '</a>' as Orgs_url from tr_dorp a, tr_store b where a.store_irn=b.store_irn union select distinct b.store_irn, '<a href="Main.aspx?evt=2048001&documentID=CEBC698F4338B9EBCF0B70BEB900086F&elementsPromp tAnswers={&[Store3]@GUID};{&[Store3]@ElementID}&hiddenSections=header,dockTop,dockLeft,footer ,path">' || a.org_name || '</a>' as Orgs_url from tr_building a, tr_store b where a.store_irn=b.store_irn and a.org_irn in (select org_irn from etl_master_building_list where school_type_code in (13,7,8)) order by 2