by Davo Smith.
JoseRey - off the top of my head:
SELECT u.id, u.firstname, u.lastname, u.email
FROM mdl_user u
JOIN (SELECT userid, COUNT(*) c
FROM mdl_user_enrolments
GROUP BY userid) ue ON ue.userid = u.id
WHERE ue.c = 1
Probably some typos in there and I haven't got access to a database to try it right now, but should be a good starting point.