console.sql 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. select device_part, device_point, measurement_type,point_name,min(sample_time) minTime,max(sample_time) maxTime, count(*)
  2. from wave_file
  3. where rpm>0
  4. group by device_part, device_point,measurement_type,point_name
  5. select point_name, measurement_type, min(sample_time) minTime,max(sample_time) maxTime, count(*)
  6. from wave_file
  7. where rpm>0
  8. group by measurement_type,point_name
  9. select point_name, measurement_type,count(*)
  10. from wave_file
  11. where rpm>0
  12. group by measurement_type,point_name
  13. select sample_time
  14. from wave_file
  15. where point_name='7号机组一缸压力盖侧' and measurement_type='压力'
  16. order by sample_time desc
  17. select sample_index,signal_value,second_value
  18. from wave_sample where wave_file_id=1572
  19. order by sample_index asc
  20. # 查找第一个有压力数据的文件
  21. select *
  22. from wave_file
  23. where point_name='7号机组一缸压力盖侧' and measurement_type='压力'
  24. and rpm>0
  25. order by sample_time asc
  26. limit 2
  27. # 7号机组一缸压力盖侧 压力 数据
  28. select * from wave_sample where wave_file_id=288146 order by wave_file_id,sample_index
  29. # 8号机组一缸压力盖侧 压力 数据
  30. select * from wave_sample where wave_file_id in(360903, 360904) order by wave_file_id,sample_index
  31. # 9号机组一缸压力盖侧 压力 数据
  32. select * from wave_sample where wave_file_id in(434810, 434968) order by wave_file_id,sample_index
  33. select min(tspluse_status),max(tspluse_status)
  34. from wave_file
  35. where rpm>0 and measurement_type='压力'
  36. select count(*)
  37. from wave_file
  38. where rpm>0 and measurement_type='压力' and tspluse_status=0
  39. order by sample_time asc
  40. # 增加标注故障预测字段,标注之前的小模型通用简单自动标注
  41. alter table wave_file add tspluse_status tinyint null default 0;
  42. alter table wave_file
  43. modify tspluse_status tinyint default 0 null comment '标注之前的小模型通用简单自动标注,0 没有异常,大于0有异常';
  44. update wave_file set tspluse_status=0;