Baseline Crisis Data and new/updated Data on Crisis Onset
Crisis
Day0
Country
Countries
ISO3
Baseline
Updates
Creates
Rohingya
Myanmar, Bangladesh
MMR, BGD
54
98
9
Irma
18
Rohingya
BGD
76
13
38
35
Irma/Maria
Maria
Anguilla, Antigua and Barbuda, Barbados, Bahamas, Bonaire, Saint Eustatius and Saba (The Netherlands), British Virgin Islands, Cuba, Dominica, Dominican Republic, Guadeloupe (France), Haiti, Martinique (France), Montserrat, Puerto Rico (The United States of America), Saint Barthélemy (France), Saint Kitts and Nevis, Saint Lucia, Saint Martin (France), Saint Vincent and the Grenadines, Sint Maarten (The Netherlands), Turks and Caicos Islands, United States Virgin Islands
The SQL queries for the Rohingya Crisis MMR and BGD (in the order Baseline, Number of Updates, List of Updates, Number of Creates, List of Creates) are:
select b.name, a.last_modified, b.location from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like~* '%mmr%mmr|bgd' and a.update_frequency != -1 and date(c.run_date) = '2017-08-24' and a.last_modified > '2016-02-24' order by a.last_modified;
with baseline as (select a.id, b.name from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like~* '%mmr%mmr|bgd' and a.update_frequency != -1 and date(c.run_date) = '2017-08-24' and a.last_modified > '2016-02-24') select e.name, maxmin(d.last_modified) as last_modified from dbdatasets d, baseline e where d.id=e.id and d.last_modified > '2017-08-24' and d.last_modified < '2017-11-25' group by e.name;
with baseline as (select a.id, b.name from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location ~* 'mmr|bgd' and a.update_frequency != -1 and date(c.run_date) = '2017-08-24' and a.last_modified > '2016-02-24') select distinct e.name, d.last_modified from dbdatasetsd, baseline e where d.id = e.id and d.last_modified > '2017-08-24' and d.last_modified < '2017-11-25' order by e.name, d.last_modified;
select e.name, maxmin(d.last_modified) as last_modified from dbdatasets d, dbinfodatasets e where e.location like~* '%mmr%mmr|bgd' and d.update_frequency != -1 and d.id not in (select distincta.id from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%mmr%.location ~* 'mmr|bgd' and c.run_date < '2017-08-25') and d.id = e.id and d.last_modified > '2017-08-24' and d.last_modified < '2017-11-25' group by e.name;
select distinct e.name, d.last_modified from dbdatasets d, dbinfodatasets e where e.location ~* 'mmr|bgd' and ad.update_frequency != -1 and date(c.run_date) = '2017-08-24d.id not in (select distinct a.id from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location ~* 'mmr|bgd' and ac.lastrun_modifieddate>< '20162017-0208-2425') and d.id=e.id and d.last_modified > '2017-08-24' and d.last_modified < '2017-11-25' grouporder by e.name, d.last_modified;
select b.name, a.last_modified, b.location from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%%~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and a.update_frequency != -1 and date(c.run_date) = '2017-09-02' and a.last_modified > '2016-03-02' order by a.last_modified;
with baseline as (select a.id, b.name from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%%~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and a.update_frequency != -1 and date(c.run_date) = '2017-09-02' and a.last_modified > '2016-03-02') select e.name, maxmin(d.last_modified) as last_modified from dbdatasets d, baseline e where d.id=e.id and d.last_modified > '2017-09-0302' group by e.name; select e.name, max(and d.last_modified) as last_modified from dbdatasets d, dbinfodatasets e where e.location like '%%' and d.update_frequency != -1 and d.id not in < '2017-12-03' group by e.name;
with baseline as (select a.id, b.name from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%%~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and a.update_frequency != -1 and date(c.run_date) = '2017-09-02' and a.last_modified > '2016-03-02') and select distinct e.name, d.last_modified from dbdatasets d, baseline e whered.id=e.id and d.last_modified > '2017-09-02' and d.last_modified < '2017-12-03' grouporder by e.name;
The SQL queries for the the Hurricane Maria Crisis () (in the order Baseline, Updates, Creates) are:
select b, d.last_modified;
select e.name, amin(d.last_modified, b.location) as last_modified from dbdatasets ad, dbinfodatasets b, dbruns ce where a.id = b.id and a.run_number = c.run_number and be.location like '%%~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and ad.update_frequency != -1 and date(c.run_date) = '2017-09-15' and a.last_modified > '2016-03-15' order by a.last_modified; with baseline as (selectd.id not in (select distincta.id, b.name from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%%' and a.update_frequency != -1 and date(~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and c.run_date)=< '2017-09-1503') and ad.last_modified > '2016-03-15') selectid =e.name, max(id and d.last_modified)as last_modified from dbdatasets d, baseline e where d.id=e.id> '2017-09-02' and d.last_modified >< '2017-0912-1603' group by e.name;
select distincte.name, max(d.last_modified) as last_modified from dbdatasets d, dbinfodatasets e where e.location like '%%~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and d.update_frequency != -1 and d.id not in (select distincta.id from dbdatasets a, dbinfodatasets b, dbruns c where a.id = b.id and a.run_number = c.run_number and b.location like '%%' and a.update_frequency != -1 and date(~* 'aia|atg|bhs|brb|bes|vgb|cub|dma|dom|glp|hti|mtq|msr|pri|blm|kna|lca|maf|vct|sxm|tca|vir' and c.run_date)=< '2017-09-15'03') and d.id = e.id and ad.last_modified > '20162017-0309-15') and d.id=e.id02' and d.last_modified >< '2017-0912-1603' grouporder by e.name, d.last_modified;