In the administration area, reports, there are quite complete log system that you can filter and export to csv /Xlsx/Json/html and work with it.
I've my moodle in Spanish, so it appears under "Registros" inside report area, i suppose that in your language is going to be something similar