Last active
November 7, 2022 13:44
-
-
Save waltton/c09772d0cf407193a891921212340728 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- A bit later... | |
SELECT pg_sleep(1); | |
-- I probably can get away with 10%, they pay anything | |
UPDATE product | |
SET price = price * 1.1 | |
, date_updated = NOW(); | |
SELECT substring(id::text, 1, 5) || '...' AS id, name, to_char(price, '999D99') AS price, '... ' || substring(date_added::text, 12, 8) AS date_added, '... ' || substring(date_updated::text, 12, 8) AS date_updated FROM product; | |
-- id | name | price | date_added | date_updated | |
-- ----------+----------------------+---------+--------------+-------------- | |
-- 3da19... | feather on the stick | 12.10 | ... 16:53:59 | ... 16:54:01 | |
-- 156a6... | mouse on the stick | 14.52 | ... 16:53:59 | ... 16:54:01 | |
-- 4ad03... | bed cavern | 168.19 | ... 16:53:59 | ... 16:54:01 | |
-- 1612f... | scratch toy | 35.09 | ... 16:53:59 | ... 16:54:01 | |
-- b9803... | loud bell ball | 9.68 | ... 16:53:59 | ... 16:54:01 | |
-- (5 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment