Query editor
WITH raw_data AS (SELECT http_post('https://api.goldsky.com/api/public/project_cmebdlgui13ef01z19lyw0ho9/subgraphs/base-graph/1.8/gn','{"query":"{ borrowDebtCrosschains { timestamp blockNumber transactionHash } positionSwapTokenByPositions { timestamp blockNumber transactionHash } supplyLiquidities { timestamp blockNumber transactionHash } withdrawLiquidities { timestamp blockNumber transactionHash } positionWithdrawCollaterals { timestamp blockNumber transactionHash } repayWithCollateralByPositions { timestamp blockNumber transactionHash } supplyCollaterals { timestamp blockNumber transactionHash } }"}',ARRAY['Content-Type: application/json', 'Accept: application/json']) AS response),-- Gabungkan semua event dengan timestampall_events AS (SELECT'BorrowDebtCrosschain' AS event_type,CAST(json_extract_scalar(e, '$.timestamp') AS BIGINT) AS timestamp_unix,CAST(json_extract_scalar(e, '$.blockNumber') AS BIGINT) AS block_number,json_extract_scalar(e, '$.transactionHash') AS tx_hashFROM raw_data,UNNEST(CAST(json_extract(response, '$.data.borrowDebtCrosschains') AS ARRAY(JSON))) AS t(e)UNION ALLSELECT'PositionSwapToken' AS event_type,CAST(json_extract_scalar(e, '$.timestamp') AS BIGINT) AS timestamp_unix,CAST(json_extract_scalar(e, '$.blockNumber') AS BIGINT) AS block_number,json_extract_scalar(e, '$.transactionHash') AS tx_hashFROM raw_data,UNNEST(CAST(json_extract(response, '$.data.positionSwapTokenByPositions') AS ARRAY(JSON))) AS t(e)UNION ALLSELECT'SupplyLiquidity' AS event_type,CAST(json_extract_scalar(e, '$.timestamp') AS BIGINT) AS timestamp_unix,CAST(json_extract_scalar(e, '$.blockNumber') AS BIGINT) AS block_number,json_extract_scalar(e, '$.transactionHash') AS tx_hashFROM raw_data,UNNEST(CAST(json_extract(response, '$.data.supplyLiquidities') AS ARRAY(JSON))) AS t(e)UNION ALLSELECT'WithdrawLiquidity' AS event_type,CAST(json_extract_scalar(e, '$.timestamp') AS BIGINT) AS timestamp_unix,CAST(json_extract_scalar(e, '$.blockNumber') AS BIGINT) AS block_number,json_extract_scalar(e, '$.transactionHash') AS tx_hashFROM raw_data,UNNEST(CAST(json_extract(response, '$.data.withdrawLiquidities') AS ARRAY(JSON))) AS t(e)UNION ALLSELECT'PositionWithdrawCollateral' AS event_type,CAST(json_extract_scalar(e, '$.timestamp') AS BIGINT) AS timestamp_unix,CAST(json_extract_scalar(e, '$.blockNumber') AS BIGINT) AS block_number,json_extract_scalar(e, '$.transactionHash') AS tx_hashFROM raw_data,UNNEST(CAST(json_extract(response, '$.data.positionWithdrawCollaterals') AS ARRAY(JSON))) AS t(e)UNION ALLSELECT