Where in the MySQL database schema is the URL alias for a group relation?
As Clive stated in the comment, all aliases are in the url_alias table.

You should join it with the og_membership table, to take the url alias of the node's group.

So, for a node with id 100, the script should look like:

select u.alias 
from og_membership og, url_alias u
where concat('node/', og.gid) = u.source
and og.etid = 100 and og.group_type like 'node'