Possible alternative :
Code:
SELECT p.id
, p.name
FROM profile p
WHERE (SELECT COUNT(*) FROM images WHERE user_id = p.id) >= 1
The advantage of the solution provided above is that you can now test for other numbers of images.
i.e. replace the 1 with 2 to get how many profiles have 2 or more images.
Or change the sign to = to get the profiles that have EXACTLY that number of images.
e.g. = 2