You will be using a SQL script for Oracle or PostGres that will build a database model
Question:
You will be using a SQL script for Oracle or PostGres that will build a database model and populate the database with data. You will be querying the data to show your expertise at joining tables. Download the scripts "SQL Scripts" for the appropriate DBMS - there are different scripts for Oracle and for PostGres because they have slightly different SQL syntax. Run the attached scripts.
Section 1: a simple select query with a where clause that would allow you to list all faculty members with a middle initial "T". What ID number(s) are returned from your query? Include your query and the ID number in your response.
Section 2: a grouping query that joins the diploma and degree tables to count the number of alumni that graduated from each department (not the number of degrees). How many people graduated from the "Information Systems" Department? Include your query and the number of people who graduated from the "Information Systems" Department in your response.
Section 3: a grouping query that joins the gift and donor_prospect tables together. Provide a list of the first and last name of any individuals who gave to any of the "Hackman Scholars Fund" scholarship fund, the "Geography Graduate Research" program fund, or the "IS Undergraduate Research" program fund. In your output list the fund they gave to (in a single query). You may find the "||" operator to be useful.
Section 4: a new grouping query that joins the same 2 tables - gift and donor_prospect. Now, your query should make a list of the same 3 funds: "Hackman Scholars Fund", "Geography Graduate Research", and "IS Undergraduate Research" and list in alphabetical order the last names of any individuals who gave to those funds on the same line. You may find the "LISTAGG" operation to be useful.
Section 5: The Department Chair of the Management Department wants to invite the best 3 prospective donors to dinner with her. She is considering inviting: Yani Fifer (DPRID: 825926593) Chuck Barakat (DPRID: 459980560) Ameerah Alday (DPRID: 224148484) Give your logic whether this is a good decision and use a query to support your position. If you would invite alternative guests, list the 3 people you would invite instead.
Please zoom in the attached sql queries
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang