sql to create test result metric table