Question: The consumer complaints data used in this lab come from the US Government: http://www.consumerfinance.gov/data-research/consumer-complaints/ Go to the above mentioned link and download consumer_complaints.csv file and
The consumer complaints data used in this lab come from the US Government:
http://www.consumerfinance.gov/data-research/consumer-complaints/
Go to the above mentioned link and download consumer_complaints.csv file and use the below schema to create the database and with the below specifications, answer the questions:
USE [Consumer Complaints] GO
CREATE TABLE Consumer_Complaints ( date_received varchar(12), product_name varchar(500), sub_product varchar(500), issue varchar(5000), sub_issue varchar(5000), consumer_complaint_narrative varchar(5000), company_public_response varchar(5000), company varchar(500), state_name varchar(2), zip_code varchar(6), tags varchar(400), consumer_consent_provided varchar(30), submitted_via varchar(100), date_sent varchar(12), company_response_to_consumer varchar(5000), timely_response varchar(30), consumer_disputed varchar(30), complaint_id varchar(10) )
INSERT INTO [dbo].[Consumer_Complaints] SELECT * FROM [dbo].[RAW_Consumer_Complaints]
Import the data
Use " as the text qualifier
Change the out put column width in Advanced to 5000 from 50
The Destination should be OLE DB for SQL Server
Change the name of the file to RAWConsumerComplaints
Use the provided code to copy the data from the RAW table to the table you created.
1. Find out how many complaints were sent and received on the same day
2. Find out how many complaints were from the state of NY, Show those complaints
3. Compare the number of complaints form NY and California, show the complaints from both states
4. Show the complaints with 'credit' in the product field.
5. Show the complaints with 'late' in the issue field.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
