Custom actions with database

Hello, I’m new to strapi, I’ve seen all videos from the website, but I have a huge problem and I don’t know how to make it work.

I need in one controller to make custom querys in the data base , generate some inserts to differents tables not the one of the controller, then return some result.

Can anyone help me or put me in the right path… I know how to make custom controllers but the querys to differents tables is making me crazy.

Regards

You are like talking about extending the admin either by customization or by plugin, check the documentation about it, please.

I’m talking about how to make custom db calls , I did check the documentation but only talks about making calls to the same table of the controller and I need to call others tablets.