taossql.sql 1.1 KB

123456789101112131415161718192021222324252627
  1. CREATE DATABASE IF NOT EXISTS fjjsfw UPDATE 2 cacheLast 1
  2. DROP DATABASE fjjsfw;
  3. CREATE DATABASE IF NOT EXISTS jsfw UPDATE 2 cacheLast 1
  4. CREATE STABLE IF NOT EXISTS jsfw.realtime_average_target
  5. (time TIMESTAMP, wind_speed FLOAT, power FLOAT, generator_speed FLOAT, impeller_speed FLOAT, wind_direction FLOAT, theory_generation FLOAT)
  6. TAGS (station_id BINARY(30),equipment_id BINARY(30),uniform_code BINARY(20), description NCHAR(50))
  7. CREATE TABLE realtime_average_target.USING realtime_average_target TAGS
  8. (,
  9. );
  10. ALTER STABLE jsfw.realtime_average_target ADD COLUMN theory_generation FLOAT;
  11. CREATE TABLE IF NOT EXISTS fjjsfw.realtime_average_target
  12. (
  13. time TIMESTAMP,
  14. equipment_id BINARY (30),
  15. wind_speed FLOAT,
  16. power FLOAT,
  17. generator_speed FLOAT,
  18. impeller_speed FLOAT,
  19. wind_direction FLOAT
  20. );
  21. CREATE STABLE IF NOT EXISTS jsfw.state_cause
  22. (start_time TIMESTAMP, end_time TIMESTAMP, event NCHAR(30), advance_state NCHAR(30), after_state NCHAR(30), user_flag NCHAR(30), time INT UNSIGNED)
  23. TAGS (station_id BINARY(30),equipment_id BINARY(30))