SELECT count(*) FROM claims_processing_stages
How many claim processing stages are there in total?
CREATE TABLE Customers (
Customer_ID INTEGER NOT NULL,
Customer_Details VARCHAR(255) NOT NULL,
PRIMARY KEY (Customer_ID)
);
CREATE TABLE Staff (
Staff_ID INTEGER NOT NULL,
Staff_Details VARCHAR(255) NOT NULL,
PRIMARY KEY (Staff_ID)
);
CREATE TABLE Policies (
Policy_ID INTEGER NOT NULL,
Customer_ID INTEGER NOT NULL,
Policy_Type_Code CHAR(15) NOT NULL,
Start_Date DATETIME,
End_Date DATETIME,
PRIMARY KEY (Policy_ID),
FOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)
);
CREATE TABLE Claim_Headers (
Claim_Header_ID INTEGER NOT NULL,
Claim_Status_Code CHAR(15) NOT NULL,
Claim_Type_Code CHAR(15) NOT NULL,
Policy_ID INTEGER NOT NULL,
Date_of_Claim DATETIME,
Date_of_Settlement DATETIME,
Amount_Claimed DECIMAL(20,4),
Amount_Piad DECIMAL(20,4),
PRIMARY KEY (Claim_Header_ID),
FOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)
);
CREATE TABLE Claims_Documents (
Claim_ID INTEGER NOT NULL,
Document_Type_Code CHAR(15) NOT NULL,
PRIMARY KEY (Claim_ID, Document_Type_Code),
FOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),
);
CREATE TABLE Claims_Processing_Stages (
Claim_Stage_ID INTEGER NOT NULL,
Next_Claim_Stage_ID INTEGER,
Claim_Status_Name VARCHAR(255) NOT NULL,
Claim_Status_Description VARCHAR(255) NOT NULL,
PRIMARY KEY (Claim_Stage_ID)
);
CREATE TABLE Claims_Processing (
Claim_Processing_ID INTEGER NOT NULL,
Claim_ID INTEGER NOT NULL,
Claim_Outcome_Code CHAR(15) NOT NULL,
Claim_Stage_ID INTEGER NOT NULL,
Staff_ID INTEGER,
PRIMARY KEY (Claim_Processing_ID),
FOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),
FOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)
);
INSERT INTO `Customers` (`Customer_ID`, `Customer_Details`) VALUES (252, 'America Jaskolski');
INSERT INTO `Policies` (`Policy_ID`, `Customer_ID`, `Policy_Type_Code`, `Start_Date`, `End_Date`) VALUES (125, 808, 'Deputy', '2018-02-10 08:56:30', '2018-03-18 09:17:26');
INSERT INTO `Staff` (`Staff_ID`, `Staff_Details`) VALUES (406, 'Clifton');
INSERT INTO `Claim_Headers` (`Claim_Header_ID`, `Claim_Status_Code`, `Claim_Type_Code`, `Policy_ID`, `Date_of_Claim`, `Date_of_Settlement`, `Amount_Claimed`, `Amount_Piad`) VALUES (15, 'Settled', 'Handphone Subsidy', 518, '2016-05-31 06:07:11', '2018-02-23 03:46:38', '349.1500', '582.0300');
INSERT INTO `Claims_Processing_Stages` (`Claim_Stage_ID`, `Next_Claim_Stage_ID`, `Claim_Status_Name`, `Claim_Status_Description`) VALUES (1, 1, 'Open', 'Open a new claim');
INSERT INTO `Claims_Processing` (`Claim_Processing_ID`, `Claim_ID`, `Claim_Outcome_Code`, `Claim_Stage_ID`, `Staff_ID`) VALUES (118, 28, 'In progress', 1, 771);