Database Exercises
SERIE 1: Project database
SubQuery / Project database
    Make Query which,...
  1. Print the lastnames of person who live in the same city as Morrison.
  2. Print the pnames of project which lies in the same city where Morrison lives.
  3. Print the pnames of the project where Morrison has been working.
    NOTE : You will need two subqueries
    • The inner subquery returns the person_id of Morrison ( person-table )
    • The outer subquery gets the person_id of Morrison and returns the corresponding project_id's
    • The mainquery gets the project_id and returns the corresponding project pnames
    • NB! the mainquery gets several project_id values (because Morrison has been working on several project ) , so you must use the the word IN in your WHERE
SERIE 2: Library database
SubQuery / Library database
    Make Query which,...
  1. Names of the borrowers which has borrowed books
  2. Names of the borrowers which has books late



Toggle Menu