Greetings, I just can not properly collect the request into the database.
Here is a screen of the tables and their links: 
You need to get a mandatory list from the events_global table with such data:
events_global.id, events_global.name, COUNT(events.id) // ΡΡΠΎ ΠΊΠΎΠ». ΠΌΠ΅ΡΠΎΠΏΡΠΈΡΡΠΈΠΉ Π΄Π»Ρ ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠ° ΠΈΠ· events_global, COUNT(tickets.id) // ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π±ΠΈΠ»Π΅ΡΠΎΠ²<br> SUM(tickets.price) // ΡΡΠΌΠΌΠ° Π²ΡΠ΅Ρ
Π±ΠΈΠ»Π΅ΡΠΎΠ² ΠΏΡΠΈΠ½Π°Π΄Π»Π΅ΠΆΠ°ΡΠΈΡ
ΠΊΠ°ΠΆΠ΄ΠΎΠΌΡ ΠΌΠ΅ΡΠΎΠΏΡΠΈΡΡΠΈΡ ΠΈΠ· events_global This is how the table should look like: 
And here is a link to the online mysql editor with a flooded test database and an underdeveloped curved query
The problem is that in one ticket from the table. tickets can be recorded more than one event in the table. ticket_events and appealing since events_globals passing through ticket_events the same ticket is affected several times and breaks all counts.
I would be very grateful to everyone who will help me.
For a long time I have been tormented by this situation.
count(distinct e.id)andcount(distinct te.id)- Mikeselect distinct ticket_id, event_id from ticket_eventswill immediately solve all the problems that were laid at the design stage of the database - Mike