Need queries that follow certain condition and meaningful to answer questions

Job ID: 34962309

Budget: $10 – $30 USD

Need SQL queries that follow the following conditions

Each SQL query needs to include one or more explicit JOINs. The JOIN or JOINs should be necessary to the query.

If a question does not require a JOIN please change the question to be one that does.

Each SQL query needs to include one or more aggregations. This could be a COUNT, AVG, SUM, or other aggregation.

At least 2 of the 4 SQL queries need to include either a subquery OR a CTE.

At least 1 of the 4 queries should use a Window Function.

The SQL queries are well formatted and use aliases.

Database: https://www.postgresqltutorial.com/postgresql-getting-started/postgresql-sample-database/

If possible share queries result in excel with charts and what does the query represent .
Related categories: SQL PostgreSQL Database Programming