Skip to content

Instantly share code, notes, and snippets.

@mtgto
Created July 23, 2020 00:24
Show Gist options
  • Save mtgto/00d3c5820effeaebb4968d53d08d5431 to your computer and use it in GitHub Desktop.
Save mtgto/00d3c5820effeaebb4968d53d08d5431 to your computer and use it in GitHub Desktop.
timestamptz
select time || ':00' as time, name, value
from (
values
(timestamptz '2020-07-22 09:00:00 UTC', 'b', 3)
, (timestamptz '2020-07-22 10:00:00 UTC', 'a', 1)
, (timestamptz '2020-07-22 10:00:00 UTC', 'b', 2)
) as t (time, name, value)
;
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
time name value
2020-07-22 18:00:00+09:00 b 3
2020-07-22 19:00:00+09:00 a 1
2020-07-22 19:00:00+09:00 b 2

Data source

key value
type postgres
host localhost
port 5432
user user
database postgres

Created by

Bdash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment