CREATE TABLE t1 (
fixed_val TINYINT UNSIGNED NOT NULL,
date_val datetime NOT NULL,
int_val INT UNSIGNED NOT NULL
);
TRUNCATE t1;
INSERT INTO t1
(
fixed_val,
date_val,
int_val
)
SELECT
1
, FROM_UNIXTIME(UNIX_TIMESTAMP('2014-01-01') + (RAND() * (86400 * 90)))
, FLOOR(RAND() * 1000)
FROM information_schema.tables
LIMIT 50;
Source: http://www.xarg.org/2012/08/running-standard-deviation-in-mysql/
Source: http://www.phpied.com/random-mysql-date/