SHARE
TWEET

Untitled

a guest Jan 16th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table eventData_82_1_141 (
  2.     moveid     INT(11)       UNSIGNED NOT NULL AUTO_INCREMENT,
  3.     timestamp  TIMESTAMP(3)  NOT NULL,
  4.     duration   MEDIUMINT(8)  UNSIGNED NOT NULL,
  5.     direction  TINYINT(3)    UNSIGNED NOT NULL,
  6.     lock       SMALLINT(5)   UNSIGNED NOT NULL,
  7.     unlock     SMALLING(5)   UNSIGNED NOT NULL,
  8.     peak       DOUBLE        NOT NULL,
  9.     rms        DOUBLE        NOT NULL,
  10.     temp       VARCHAR(6)    DEFAULT NULL,
  11.     proc       TINYINT(1)    UNSIGNED NOT NULL DEFAULT '0',
  12.     PRIMARY KEY ( moveid )
  13. ) ENGINE=InnoDB
  14.    
  15. SELECT * FROM -table- WHERE timestamp <= NOW(3) ORDER BY timestamp DESC LIMIT 500
  16.    
  17. +--------+-------------------------+
  18. | moveid |        timestamp        |
  19. +--------+-------------------------+
  20. | 23     | 2019-01-11 13:00:04.000 |
  21. | 22     | 2019-01-11 12:57:32.000 |
  22. | 21     | 2019-01-11 12:54:45.000 |
  23. +--------+-------------------------+
  24.    
  25. SELECT * FROM -table- ORDER BY timestamp DESC LIMIT 500
  26.    
  27. +--------+-------------------------+
  28. | moveid |        timestamp        |
  29. +--------+-------------------------+
  30. | 43     | 2019-01-17 02:00:16.000 |
  31. | 42     | 2019-01-17 01:57:05.000 |
  32. | 41     | 2019-01-17 01:54:34.000 |
  33. +--------+-------------------------+
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top