Created
January 30, 2021 12:13
-
-
Save jdaarevalo/653fde05d060cc02a3a7c7a76a83306f to your computer and use it in GitHub Desktop.
six-section-fill_tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Filling of order_status | |
INSERT INTO order_status | |
select gen_random_uuid () | |
, date_sale + random()* (date_sale + '5 days' - date_sale) | |
, sale_id | |
, floor(random() * (current_setting('my.status_names')::int) + 1)::int | |
from sale; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment