Skip to content

Commit

Permalink
add timestamp using rand(42)
Browse files Browse the repository at this point in the history
  • Loading branch information
RusticPotatoes committed Nov 11, 2023
1 parent 9147f41 commit be65ee5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mysql/docker-entrypoint-initdb.d/02_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ LIMIT
10000 -- Limit the number of combinations to insert
;

INSERT INTO Predictions (name, predicted_confidence, prediction)
INSERT INTO Predictions (name, predicted_confidence, prediction, created)
SELECT
name,
FLOOR(RAND(6)*(100-1)+1),
Expand Down Expand Up @@ -162,7 +162,11 @@ SELECT
WHEN 23 THEN 'barrows_bot'
WHEN 24 THEN 'herblore_bot'
ELSE 'unknown_bot'
END
END ,
FROM_UNIXTIME(
TIMESTAMPDIFF(SECOND, '2020-01-01 00:00:00', '2022-12-31 23:59:59') * RAND(42)
+ UNIX_TIMESTAMP('2020-01-01 00:00:00')
)
FROM `Players`
ORDER BY RAND(42)
LIMIT 250
Expand Down

0 comments on commit be65ee5

Please sign in to comment.