An online interactive learning environment which offers immediate feedback to student learning SQL was constructed. This has supported the gathering of interesting statistics on student behaviour. Changes to the environment targeted at improving student behaviour can be made, and the impact of these changes measured statistically on real students. This paper considers a cycle through measuring student behaviour, implementing methods to try and improve the behaviour, and the result of these changes. KEYWORDS e-learning, SQL, automatic marking, learning environment., Web based learning