How can I extract the adminstrative records for a EU GDPR request?

Dear Discourse devs, admins and users.

is someone of you great folks able to help me to solve a EU GDPR request where I do have to provide the data next Tuesday?

With the great tool from @angus I was already able to extract as the admin quite a lot of information for the user who requested his data. @angus had fixed the bug that I first had encountered.
But in order to be prepared that also the 'administrative’ records with the user’s user_id such as flags, complaints and staff whispers might also have to be provided, what would be the best SQL statements to get the data from the database with the data explorer?
I am not so familiar with the different tables and their structure and I want to avoid that I might extract incorrect information due to my missing knowledge of the different tables and their usage.

The German authorities are quite restrict with violations against the german data protection law (based on the EU GDPR regulations) and the user requests based on this law. I want to avoid to get a penalty for my organization by the authorities.

Any help will be appreciated
best regards

Edit: perhaps best to refer to the linked topic Legal Tools Plugin and specifically the extended download?

If you install the Data Explorer official plugin, when you create a query you can search for ‘user_id’ and get a drop-down of all tables with records like that. Maybe this is a starting point?

I see about 75 tables with user_id columns, if I read it right. (“userid records” is the arbitrary name I gave this new query.)

1 Like

well that I had already done before :wink:
But looking thru these tables did not really help me to identify the administrative records.
I expect that I will have to join tables in order to get these records but I am unsure which tables would be the correct ones.

For example records like ‘Was flagged’ or ‘Flagged’ so similiar to the ones in the extracted data:
Got Private Message
New Private Message
New Topic
Was Liked