-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_staging.sql
More file actions
36 lines (27 loc) · 859 Bytes
/
data_staging.sql
File metadata and controls
36 lines (27 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- THIS QUERY CREATES THE INSURANCE COMPLAINTS SCHEMA AND
-- THE TABLE THAT WILL HOLD THE ORIGINAL INSURANCE COMPLAINTS DATA.
DROP SCHEMA IF EXISTS insurance_complaints;
CREATE SCHEMA insurance_complaints;
USE insurance_complaints;
DROP TABLE IF EXISTS insurance_complaints.complaints;
CREATE TABLE insurance_complaints.complaints
(
complaint_no INT NOT NULL,
complaint_filed_against TEXT NULL,
complaint_filed_by TEXT NULL,
reason_complaint_filed TEXT NULL,
confirmed_complaint TEXT NULL,
how_resolved TEXT NULL,
received_date TEXT NULL,
closed_date TEXT NULL,
complaint_type TEXT NULL,
coverage_type TEXT NULL,
coverage_level TEXT NULL,
others_involved TEXT NULL,
respondent_id INT NOT NULL,
respondent_role TEXT NULL,
respondent_type TEXT NULL,
complainant_type TEXT NULL,
keywords TEXT NULL,
PRIMARY KEY (complaint_no, respondent_id)
);