Must Watch Live Mock Interview for Aspiring Azure Data Engineers | Azure Data Pipeline, PySpark, SQL

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 1

  • @AnandKumar-wq3vo
    @AnandKumar-wq3vo 2 หลายเดือนก่อน

    with cte as (
    select *, row_number() over (order by start_time) as rownum,
    DATEADD(MINUTE,-1* row_number() over (order by start_time) ,start_time) as updated_time
    from service_status where status = 'down'
    )
    select service_name,min(start_time) as start_updated_time,max(start_time) as end_updated_time,
    status from cte group by service_name,updated_time,status
    having count(*)>3