sssstatisticLand Activity Points - Season copy
    Updated 2024-10-08
    -- forked from Land Activity Points - Season @ https://flipsidecrypto.xyz/studio/queries/80b1d20a-6c14-4a84-b85b-81b656f6ea55

    -- land war season time
    with megawar_times as (
    select
    decoded_log['seasonId'] AS season,
    to_timestamp(decoded_log['endTime']) + interval '1 hour' AS start_time,
    CASE
    WHEN decoded_log['seasonId'] = 3
    THEN to_timestamp(decoded_log['endTime']) + interval '8 day' - interval '1 hour'
    WHEN decoded_log['seasonId'] = 4
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '10 hour'
    WHEN decoded_log['seasonId'] = 5
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '10 hour'
    WHEN decoded_log['seasonId'] = 6
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '10 hour'
    WHEN decoded_log['seasonId'] = 7
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '10 hour'
    WHEN decoded_log['seasonId'] = 8
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '10 hour'
    WHEN decoded_log['seasonId'] = 9
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '11 hour'
    WHEN decoded_log['seasonId'] = 10
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '11 hour'
    WHEN decoded_log['seasonId'] = 11
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '11 hour'
    WHEN decoded_log['seasonId'] = 12
    THEN to_timestamp(decoded_log['endTime']) + interval '5 day' + interval '11 hour'
    ELSE
    to_timestamp(decoded_log['endTime']) + interval '5 day' - interval '1 hour'
    END AS end_time
    from blast.core.ez_decoded_event_logs
    where
    contract_address in (
    '0xc48f6213a1a4d3ead79db812c2b91817980532c3'
    )
    QueryRunArchived: QueryRun has been archived