SELECT UserLogin, FirstName, LastName
FROM Users
where UserID in (
select UserID
from UserPropertyValues upv1
inner join UserPropertyValues upv2 on upv1.UserID = upv2.UserID
and upv1.PropertyValueID = 1 and upv2.PropertyValueID = 5
) a
RedFilter
2010-04-15 17:36:41