Project 2. SQL queries.

Express the following queries in SQL:
  1. Get supplier ID and name for suppliers that supply to > 2 distinct projects in 'Rome' but to < 4 distinct projects in 'Paris'. NOTE: you can count the number of unique occurrences of an attribute value by using: count(distinct attrname).
  2. Get supplier ID and name of suppliers who supply at least 3 parts to project 'j4'.
  3. Find supplier ID and name of suppliers who supply the same project with > 3 different parts.
  4. Find supplier ID and name of suppliers who supply to at least one project in every city other than 'Athens' and 'Atlanta' and do not supply to any project in 'Athens' and 'Atlanta'.
    Note: the supplier selected cannot supply to projects in Athens and Atlanta.
  5. Find supplier ID and name of suppliers who have 3 or more shipments to all projects in the city they live in.
  6. Find supplier ID and name of suppliers who supply to at least one project in every city other than 'Athens' and 'Atlanta'.
    Note: the supplier selected may supply to projects in Athens and Atlanta.
  7. For each supplier, find supplier ID, name, and the part ID and name of parts that the supplier supplies, but only for parts that the supplier supplies to > 3 projects.
  8. Find supplier ID and name of suppliers who supplies to project 'j4' and to a project in 'Paris'.
  9. For each project, list the project ID, name and the total weight of parts from 'Smith' being shipped to the project.
  10. Find project ID and name of projects that use the heaviest part(s).
  11. Find project ID and name of projects that use the second heaviest part(s).
  12. For each supplier, find supplier ID, name, and the part ID and name of the heaviest part(s) that the supplier supplies to projects in Paris.
All select statements in the solutions must be commented. Do not forget to comment nested queries as well. The comments should contain the description of what this particular statement selects.

Good luck!