SQL query to list current users in a journal

Hi,
I want to write an SQL query that lists current users in a journal as it is shown via GNU (Journalxx → Users & Roles → Users) for a given journal. I can’t find the relationship between user_id/username in the table “users” and a journal_id in the table journal. How can I do this? Using OJS .3.3.0.7.

Thanks in advance

Cheers
Obi

Thanks Marc. I was thinking of writing SQL query to find out a given username or user_id which journal the user belongs to . Example:

user_id              Username            journal_id          path
23                   betaalfa             3                  finejournal

Cheers
Obi

I think I found, according to: Deleting a user from one journal in a multi journal installtion - #7 by asmecher

– Lista as Roles e Journals de um ID de usuário
SELECT *
FROM user_user_groups
JOIN user_groups ON (user_groups.user_group_id = user_user_groups.user_group_id)
JOIN journals ON (user_groups.context_id = journals.journal_id)
JOIN users ON (user_user_groups.user_id = users.user_id)
WHERE users.user_id =‘ID’;