Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UPDATE "price_index" AS "t"
  2. SET
  3.   "average"="v"."average"::numeric,
  4.   "weighted"="v"."weighted"::numeric,
  5.   "trades_count"="v"."trades_count",
  6.   "volume"="v"."volume"::numeric,
  7.   "volume_quote"="v"."volume_quote"::numeric,
  8.   "min"="v"."min"::numeric,
  9.   "max"="v"."max"::numeric,
  10.   "open"="v"."open"::numeric,
  11.   "close"="v"."close"::numeric,
  12.   "open_trade_time"="v"."open_trade_time"::timestamp,
  13.   "close_trade_time"="v"."close_trade_time"::timestamp,
  14.   "last_trade_id"="v"."last_trade_id",
  15.   "updated_at"="v"."updated_at"::timestamp
  16. FROM
  17.   (VALUES
  18.     (28,'D1','2018-04-12T00:00:00.000+00:00','6053.940780000023','6112.952385581849',22000,'3218.856392500000','19676715.863378227600','5481.000000000000','6568.020000000000','5625.530000000000','6225.150000000000','2018-04-12T00:00:12.000+00:00','2018-04-12T12:35:53.000+00:00',30070784,'2018-04-23T09:13:56.068+00:00'))
  19.    AS
  20.   "v"(
  21.   "price_index_config_id",
  22.   "type",
  23.   "time",
  24.   "average",
  25.   "weighted",
  26.   "trades_count",
  27.   "volume",
  28.   "volume_quote",
  29.   "min",
  30.   "max","open","close","open_trade_time",
  31.   "close_trade_time","last_trade_id","updated_at")
  32. WHERE
  33.   t.price_index_config_id = v.price_index_config_id
  34.   AND t.type = v.type
  35.   AND t.time = v.time::timestamp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement