Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started