Add accident_copy.sql
This commit is contained in:
parent
419856ab41
commit
7d9d561139
16
analysis/database/accident_copy.sql
Normal file
16
analysis/database/accident_copy.sql
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
drop table if exists accident_copy;
|
||||||
|
|
||||||
|
create table accident_copy as
|
||||||
|
select * from accidents;
|
||||||
|
alter table accident_copy add severity varchar;
|
||||||
|
update accident_copy set severity = 'Accident with property damage'
|
||||||
|
where accidentseveritycategory='as4';
|
||||||
|
|
||||||
|
update accident_copy set severity = 'Accident with light injuries'
|
||||||
|
where accidentseveritycategory='as3';
|
||||||
|
|
||||||
|
update accident_copy set severity = 'Accident with severe injuries'
|
||||||
|
where accidentseveritycategory='as2';
|
||||||
|
|
||||||
|
update accident_copy set severity = 'Accidents with fatalities'
|
||||||
|
where accidentseveritycategory='as1';
|
||||||
Reference in New Issue
Block a user