Good day, just learning SQL I can not figure out, the task is this: For each type of recovery, get the total number of imposed penalties for all types of posts
there is a database with the following tables and fields
Personal card
- personal number
- job code
- Job title
achievement list
- personal number
- promotion date
- kind of promotion
- collection date
type of recovery to calculate the amount separately figured out
SELECT "ΠΠΎΡΠ»ΡΠΆΠ½ΠΎΠΉ ΡΠΏΠΈΡΠΎΠΊ"."ΠΠΈΠ΄ Π²Π·ΡΡΠΊΠ°Π½ΠΈΡ", COUNT ("ΠΠΎΡΠ»ΡΠΆΠ½ΠΎΠΉ ΡΠΏΠΈΡΠΎΠΊ"."ΠΠΈΠ΄ Π²Π·ΡΡΠΊΠ°Π½ΠΈΡ") FROM public."ΠΠΈΡΠ½Π°Ρ ΠΊΠ°ΡΡΠΎΡΠΊΠ°", public."ΠΠΎΡΠ»ΡΠΆΠ½ΠΎΠΉ ΡΠΏΠΈΡΠΎΠΊ" GROUP BY "ΠΠΎΡΠ»ΡΠΆΠ½ΠΎΠΉ ΡΠΏΠΈΡΠΎΠΊ"."ΠΠΈΠ΄ Π²Π·ΡΡΠΊΠ°Π½ΠΈΡ"
and all together I do not understand how