Can anyone please help me here - I think this is probably quite simple but so am I and I'm a bit stuck!

I have some nodes that 'belong' to certain Organic Groups.

Each node can only belong to one of these groups. (Although this fact may not be of any importance).
Periodically I wish to load up the nodes one by one and create 'clones' of them, make some slight adjustments and then save them back into the database as 'new' nodes belonging to the same (original) group. I'm reasonably OK working programmatically on this stuff but the problem is...

If I already know each of the nodes' group's 'gid' then it's easy to write the code but I dont' so I need to be able 'look up' the group that each of my node belongs to.
I'm pretty well-versed with views so if anyone can help me that way, that'd be great. If not then just a straight forward SQL command would be lovely!

Thank you.