Skip to content

Block time  #22

@apierr

Description

@apierr

To calculate the block_time from the received_time variable of block, I calculated the difference between previous and current row.

SELECT
    height,
    received_time, 
    received_time - LAG ( received_time, 1, 0 ) OVER ( ORDER BY height ) block_time 
FROM
    block 
LIMIT 10
OFFSET 1; --- select all rows except top row 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions