sql-exercises / ex12.sql
ex12.sql
Raw
INSERT OR IGNORE INTO ContinentInfo SELECT dataset.rowid, countryterritoryCode, continentExp FROM dataset GROUP by geoid;
INSERT OR IGNORE INTO CountryInfo SELECT dataset.geoId, dataset.countriesAndTerritories, ContinentInfo.ctc_id, popData2018 FROM dataset INNER JOIN ContinentInfo ON ContinentInfo.ctc_id = dataset.rowid;
INSERT OR IGNORE INTO DateInfo SELECT dateRep, day, month, year FROM dataset;
INSERT OR IGNORE INTO DailyStats SELECT dateRep, geoId, cases, deaths FROM dataset;