You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

weather.sql 988B

12345678910111213141516171819202122232425262728293031
  1. CREATE TABLE IF NOT EXISTS `weather` (
  2. `observation_id` int NOT NULL AUTO_INCREMENT,
  3. `date` date DEFAULT NULL,
  4. `time` time DEFAULT NULL,
  5. `rainfall` float DEFAULT NULL,
  6. `rel_hum` decimal(10,0) DEFAULT NULL,
  7. `temp` float DEFAULT NULL,
  8. `windspeed` float DEFAULT NULL,
  9. `station` int DEFAULT NULL,
  10. `station_name` varchar(255) DEFAULT NULL,
  11. `winddir` int DEFAULT NULL,
  12. PRIMARY KEY (`observation_id`),
  13. UNIQUE KEY `date_time_idx` (`date`,`time`,`station`)
  14. );
  15. CREATE TABLE IF NOT EXISTS `aggregated_weather` (
  16. `Date_id` int NOT NULL AUTO_INCREMENT,
  17. `Date` date DEFAULT NULL,
  18. `T_max` float DEFAULT NULL,
  19. `T_min` float DEFAULT NULL,
  20. `T_mean` float DEFAULT NULL,
  21. `RH_max` float DEFAULT NULL,
  22. `RH_min` float DEFAULT NULL,
  23. `RH_mean` float DEFAULT NULL,
  24. `Rainfall` float DEFAULT NULL,
  25. `ETo` float DEFAULT NULL,
  26. `station` int DEFAULT NULL,
  27. `station_name` varchar(255) DEFAULT NULL,
  28. PRIMARY KEY (`Date_id`),
  29. UNIQUE KEY `date_idx` (`Date`,`station`)
  30. );