**Titanic Data Analysis with MySql **

## 2. Survival relationship by factor

sum(survived) / count(passengerid)as survived_ratio from mydata_titanic.full group by 1;

### 2-2. Age, gender

### 2-3. Pclass (room class)

select distinct pclass from mydata_titanic.full; * Number of passengers, number of survivors, and survival rate by room class select pclass, count(passengerid) as n_passengers, sum(survived) as n_survived, sum(survived) / count(passengerid) as survived_rate from mydata_titanic.full group by pclass order by 1; * Multiple grade, age, gender, survival rate select pclass, sex, count(passengerid) as n_passengers, sum(survived) as n_survived, sum(survived) / count(passengerid) as survived_rate from mydata_titanic.full group by pclass, sex order by 2, 1; select pclass, sex, floor(age/10)*10 as ageband, count(passengerid) as n_passengers, sum(survived) as n_survived, sum(survived) / count(passengerid) as survived_rate from mydata_titanic.full group by pclass, sex, floor(age/10)*10 order by 2, 1;

## 3.Embarked

## 4. Passenger analysis

sum(1) as n_passengers,sum(survived) / sum(1) as survived_ratio from mydata_titanic.full group by 1; * Number of tipped passengers 10 or more, survival rate 0.5 or more select hometown, sum(1) as n_passengers, sum(survived)/sum(1) as survived_ratio from mydata_titanic.full group by 1 having sum(survived)/sum(1) >= 0.5 and sum(1) >=10;

## 5. Correlation Analysis

Data analysis procedures for each task

Chapter 1 Database and SQL

Chapter 2 SQL grammar

Chapter 3 Data addition, deletion, update, and data consistency

Chapter 4 Report writing using automobile sales data Chapter

5 Report writing using product review data

Chapter 6 Food delivery data analysis

Chapter 7 UK Commerce data Writing reports using

Chapter 8 Titanic data analysis

Chapter 9 Linking R and Python