Hi Laxmi,
This is not quite possible to fetch all the users and their group membership from Query Builder. You'll have to create your custom code for that.
You can try this macro for that - http://www.forumtopics.com/busobj/viewtopic.php?t=89434
For your ability to export the security query results, I believe it has something to do with licensing. I'll check and that and let you know.
Regards,
Rahul