--SELECT top 10 * FROM vw_GetAllWaveRatingReport
create VIEW vw_GetAllWaveRatingReport
AS
SELECT TOP 10 t2.Test_Name AS WaveName
,t2.StartDate AS WaveStartDate
,t2.EndDate AS WaveEndDate
,t2.CreatedBy AS WaveCreatedBy
,t2.CreatedDate AS WaveCreatedDate
,t1.Center
,t1.Centers
,t1.MGRID AS ManagerEmpId
,t1.Manager AS ManagerName
,t1.empid AS EngineerEmpId
,t1.NAME AS EngineerName
,t1.skill1 AS Skill
,t1.test_id
,t1.rating AS Rating
,CONVERT(VARCHAR(10), round(CONVERT(FLOAT, (
(
SELECT TOP 1 TIME
FROM Test_Create_v3
) - (
SELECT MIn(TIME)
FROM test_results_v3
WHERE test_id = t1.test_id
)
)) / 60, 0)) + ' min' AS TimeTaken
,t1.PrimaryRole
,t1.SecondaryRole
,t1.PrimaryServiceTower
,t2.id
,t2.SkillPerEmp
,t2.TestType
,t2.Test_Instruction
,t2.maxreassign
FROM vw_Mgr_rpt t1
INNER JOIN TCI_Test_Name t2 ON t1.Id = t2.id
WHERE t1.Center = 'Global'
ORDER BY t2.Test_Name
,t1.Manager
,t1.NAME
,t1.skill1