-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcorona.sql
63 lines (52 loc) · 1.49 KB
/
corona.sql
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
create database if not exists corona;
use corona;
create table locations (
/* Administrative division location */
country varchar(256) default '',
province varchar(256) default '',
county varchar(256) default '',
population float,
population_density float,
latitude float(10, 6),
longitude float(10, 6),
start_cases date,
primary key (country, province, county)
) collate utf8_bin;
create table datapoints (
entry_date varchar(16),
update_time datetime not null default CURRENT_TIMESTAMP,
country varchar(320) default '',
province varchar(320) default '',
county varchar(320) default '',
`group` varchar(320) default '',
total integer default 0,
recovered integer default 0,
deaths integer default 0,
serious integer default 0,
tests integer default 0,
hospitalized integer default 0,
-- source_total TEXT,
-- source_recovered TEXT,
-- source_deaths TEXT,
-- source_serious TEXT,
-- source_tests TEXT,
-- source_hospitalized TEXT,
PRIMARY KEY(country, province, county, entry_date)
) COLLATE utf8_bin;
create table hospitals (
hospital_id int auto_increment primary key,
hospital_name varchar(256),
hospital_type varchar(256),
`address1` varchar(256),
`address2` varchar(256),
country varchar(256),
province varchar(256),
county varchar(256),
licensed_beds int default 0,
staffed_beds int default 0,
icu_beds int default 0,
adult_icu_beds int default 0,
pediatric_icu_beds int default 0,
potential_beds_increase int default 0,
average_ventilator_usage int default 0
);