ur_ingest_session_tasks_stats_latest

Column Type
device_id VARCHAR
ingest_session_id VARCHAR
ingest_session_started_at TIMESTAMPTZ
ingest_session_finished_at TIMESTAMPTZ
ur_status
nature
total_file_count
file_count_with_content
file_count_with_frontmatter
min_file_size_bytes
average_file_size_bytes INT
max_file_size_bytes
oldest_file_last_modified_datetime
youngest_file_last_modified_datetime

SQL DDL

CREATE VIEW "ur_ingest_session_tasks_stats_latest" AS
    SELECT iss.*
      FROM ur_ingest_session_tasks_stats AS iss
      JOIN (  SELECT ur_ingest_session.ur_ingest_session_id AS latest_session_id
                FROM ur_ingest_session
            ORDER BY ur_ingest_session.ingest_finished_at DESC
               LIMIT 1) AS latest
        ON iss.ingest_session_id = latest.latest_session_id