create table TestTable(
column1 varchar(max),
column2 varchar(max),
column3 varchar(max),
column4 varchar(max),
column5 varchar(max),
column6 varchar(max)
)
GO
insert into TestTable
select 'ALA MOANA CLINIC','All','All',NULL,'10.92',null union all
select 'ALA MOANA CLINIC','All','All','10.38',NULL,null union all
select 'ALA MOANA CLINIC','BHS','ALM','TREATMENT INDIVIDUAL',NULL,'30.1' union all
select 'ALA MOANA CLINIC','BHS','ALM','TREATMENT INDIVIDUAL','15',NULL
GO
select column1,column2,column3,MAX(column4),MAX(column5),MAX(column6)
from TestTable group by column1,column2,column3
go
|