Question: 1 Querying Multiple Tables (50pt) 1. Import data from banks_sec_2002 and banks_al_2002. Delete duplicate rows from banks_sec_2002 2. Select proper join manner to join

1 Querying Multiple Tables (50pt) 1. Import data from banks_sec_2002 and banks_al_2002.

1 Querying Multiple Tables (50pt) 1. Import data from banks_sec_2002 and banks_al_2002. Delete duplicate rows from banks_sec_2002 2. Select proper join manner to join banks_sec_2002 and banks_al_2002. Make sure that all data from banks_sec_2002 are kept in the joint table. Report the first 10 observations. 3. Create a new table banks_total. Insert the values from previous joint table into this new one. And set a primary key for the table. 4. For each quarter of the year 2002 count how many banks have security over 20% of its' asset. 5. How many banks have liability over 90% of assets in first quarter of 2002 but goes below 90% in the second quarter of 2002. 6. Export the joint table (banks_total) to a csv file. 2 PostgreSQL API in R. (50pt) Complete following tasks in R using PostgreSQL API: 1. Make a connection to your local PostgreSQL database using API. 2. Import the csv file you got from Problem 1 (banks_total) into a new table in the database using API. (Hint. Please give the table a new name if table 'banks_total' exists in the database) 3. Retrieve the data of table 'banks_total' using API. Count how many rows in the table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!