• Why don't you show us what you have tried to solve your problem and where you are having problems.

    Sample data (as INSERT INTO statements) for each table and expected results based on the sample data will also help.