Question: TINST 311: Database Management & Data Analysis Lab 1: Creating Databases and Tables + Data Exploration General Description This lab focuses on working with the


TINST 311: Database Management & Data Analysis Lab 1: Creating Databases and Tables + Data Exploration General Description This lab focuses on working with the PostgreSQL DBMS and the pgAdmin GUI administration interface. For this lab, you will be creating a database, creating a table, filling it with data, and writing some custom queries. Requirements: In order to complete this lab, you will need to perform the following: . Create a new database Create a table Add data to the table Perform various data exploration queries Keep all SQL queries (including table creation and row insertion) written in a single text file you will turn in Steps: Step 1: Create a new database in PgAdmin named 'lab01'- this can be done either via SQL or from the pgAdmin GUI Steps 2 & 3: In the new database, create a table named 'scahawks_players' and fill it with the data from the table below. It is important to note that cach player number is unique, and can act as a primary key - what does that mean when making the table compared to the example in the slides? no first_name 89 Doug 18 Jaron 32 Chris 27 Mike 84 Ed 16 Tyler 83 David 20 Rashaad 81 Nick 3 Russell last_name Baldwin Brown Carson Davis Dickson Lockett Moore Penny Vannett Wilson position age WR 30 WR 29 RB 24 RB 25 TE 31 WR 26 WR 24 RB 22 TE 25 QB 30 salary 11,500,000 2,750,000 616,282 1,337,500 3,566,667 829,688 555,000 2,691,360 816,220 21,900,000 Step 4: Write SQL queries to perform the following requests: Select all data from the seahawks players table Gather the full names and salaries of each player Obtain the unique names of all player positions Gather the full names and salaries of all players again, this time sorting the results by salary amount with the largest first Obtain the last names of all players as well as their position and ages, ordering them by position alphabetically first, and age second Gather the full name and salary of just the wide receivers (WR) Now gather the name and salary of all the players that aren't a wide receiver Obtain the full name and age of all players that are 25 or younger Obtain the full name and salary of all players that make 2,750,000 or more Gather the full names and salaries of players that make between 1,000,000 and 5,000,000 Get the list (with all attributes) of running backs (RB) that make more than 1,000,000 Gather a list of wide receivers that make either more than 10,000,000 or less than 1,000,000 Final Step: Put all of your sql commands written from steps 2-4 into a single text file and save it as: Lab1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
