sql - MySQL to PostgreSQL: GROUP BY issues -


So I decided to try PostgreSQL instead of MySQL, but I'm facing some minor conversion problems. It was a question to me that samples are from four tables and spit them out on the result.

How am I at the loss of expressing it in PostgreSQL and especially in Django, but I'm leaving for that one more quesiton so bonus points if you can Django-fy, but no Do not worry if you only pure it SQL