This is a follow-up question from this comment
The use case is for such query below:
INSERT INTO "GamingLogs" AS GL ("GameName", "TimeSpent")
VALUES ('LOL', '2'),
('DOTA2', '1'),
('Mobius Final Fantasy', '3')
ON CONFLICT ("GameName") DO UPDATE
SET "TimeSpent" = GL."TimeSpent" + EXCLUDED."TimeSpent"
Assume the data table contains primary string key on GameName
, and an integer column TimeSpent
. The purpose let's assume it logs my lifetime total hours of gaming time on given GameName
.
UPDATE: simplified the query and added the structure of the data.
Date
,Hour
as properties, something else, but I would be just guessing. – Coopery