Is it what you want or just give me result which you want base on this data
so that can give you query
declare @workplace table(
Workplacecode int identity(1,1),
WRegn varchar(50),
WorkplaceName varchar(50),
NumOfEmployees int,
EmpNumber int,
address_id int
)
declare @Employee table(
EmpNumber int identity(1,1),
EmpName varchar(50)
)
declare @Address table(
Address_id int identity(1,1),
address1 varchar(50)
)
insert into @workplace values
('Test','Name',1000,1,1)
,('Test1','Name1',1000,2,1)
,('Test2','Name2',1000,3,3)
insert into @Employee values
('Empname'),
('Empname1'),
('Empname2')
insert into @Address values
('Add'),
('Add1'),
('Add2')
select * from @workplace as w
left join @Employee e on w.EmpNumber=e.EmpNumber
left join @Address a on w.address_id=a.Address_id