SELECT A.BRNNAME,A.SCORE , COALESCE(A.Q1Y1C, 0) Q1Y1C , COALESCE(C.Q1Y2C, 0) Q1Y2C ,
COALESCE(A.Q2Y1C, 0) Q2Y1C , COALESCE(C.Q2Y2C, 0) Q2Y2C ,
COALESCE(A.Q3Y1C, 0) Q3Y1C , COALESCE(C.Q3Y2C, 0) Q3Y2C ,
COALESCE(A.Q4Y1C, 0) Q4Y1C , COALESCE(C.Q4Y2C, 0) Q4Y2C ,
ROUND(COALESCE(B.Q1Y1P, 0.00),2) Q1Y1P , COALESCE(ROUND(D.Q1Y2P,2), 0.00) Q1Y2P ,
COALESCE(ROUND(B.Q2Y1P,2), 0.00) Q2Y1P , COALESCE(ROUND(D.Q2Y2P,2), 0.00) Q2Y2P ,
COALESCE(ROUND(B.Q3Y1P,2), 0.00) Q3Y1P , COALESCE(ROUND(D.Q3Y2P,2), 0.00) Q3Y2P ,
COALESCE(ROUND(B.Q4Y1P,2), 0.00) Q4Y1P , COALESCE(ROUND(D.Q4Y2P,2), 0.00) Q4Y2P
FROM Y1C A
INNER JOIN Y1P B ON A.BRNNAME=B.BRNNAME AND A.SCORE=B.SCORE
INNER JOIN Y2C C ON A.BRNNAME=C.BRNNAME AND A.SCORE=C.SCORE
INNER JOIN Y2P D ON A.BRNNAME=D.BRNNAME AND A.SCORE=D.SCORE
ORDER BY A.BRNNAME
What I have tried:
Codes under construction tried the following but not working