declare @newTime varchar(50); declare @lasetTime varchar(50); set @newTime= getdate(); set @lasetTime= STUFF(sUBSTRING(@newTime,1,5),3,1,''); select * from (select * from(select B.Name,B.Id,B.Price,B.Term,B.Value,C.LoginName from (select * from(SELE…