Internet-based learning environments have significant advantages for students. Students can manage their own time, and prioritise their studies. However, a common view of such learning environments is little more than a repository of documents, slides, and tutorial sheets. ActiveSQL takes this a stage further, offering interactive practical sessions for learning SQL. These sessions provide tutorial questions which the student answers by typing in SQL statements. These statements are executed, and the results of the SQL shown to the user. The system also evaluates the SQL, grading it as a percentage. This grading system is also used to automatically assess SQL coursework, which is itself integrated into the learning environment. This paper considers this automatic grading system as it has evolved over a number of years, and evaluates the impact it has had on student learning and behaviour.