
/* Code Fragment 9.11 When was the type of a projection erroneously changed to be identical of an existing projection? */

SELECT 	P1.PROJECTION_ID, P2.PROJECTION_ID, P1.PROJECTION_TYPE AS Identical_TYPE,
	P3.PROJECTION_TYPE AS Prior_TYPE, P2.Start_Date AS When_Changed
FROM P_TT AS P1, P_TT AS P2, P_TT AS P3
WHERE P1.PROJECTION_ID <> P2.PROJECTION_ID
AND   P2.PROJECTION_ID = P3.PROJECTION_ID
AND   P1.PROJECTION_TYPE = P2.PROJECTION_TYPE
AND   P2.PROJECTION_TYPE <> P3.PROJECTION_TYPE
AND   P3.Stop_Date = P2.Start_Date
