forecast_api/inquirey/change_log.sql

15 lines
377 B
MySQL
Raw Permalink Normal View History

WITH l AS (
SELECT DISTINCT logid FROM rlarp.osm_pool
)
SELECT
doc->>'user' as user,
(doc->>'stamp')::timestamptz stamp,
2021-04-14 11:28:11 -04:00
doc->>'type' as type,
CASE WHEN logid IS NULL THEN 'undone' ELSE '' END flag,
doc->>'tag', doc->>'message',
doc->'scenario'->>'quota_rep_descr' dsm
FROM
rlarp.osm_log
LEFT OUTER JOIN l ON logid = id
LIMIT 1000;