SQL Interview Question | TCS | 18

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 6

  • @chandigarhlife7458
    @chandigarhlife7458 День назад +1

    Its out of my mind

  • @nigamsaha6856
    @nigamsaha6856 23 часа назад +1

    Wow great 👍

  • @Dwarakai555
    @Dwarakai555 2 дня назад

    Nice pls post more questions

  • @rampavan9521
    @rampavan9521 День назад

    with cte as(
    select *,row_number()over() rnk from call_start
    ),
    cte2 as(
    select *,row_number()over() rnk from call_end
    )
    select t1.ph_no,t1.start_time,t2.end_time,extract(minute from (end_time-start_time)) from cte t1
    join cte2 t2
    on
    t1.rnk = t2.rnk

  • @priyarane3980
    @priyarane3980 2 дня назад

    with cte1 as(
    select *, row_number() over(partition by ph_no order by start_time) as r_no
    from call_start),
    cte2 as(
    select *, row_number() over(partition by ph_no order by end_time) as r_no
    from call_end)
    select cte1.ph_no, cte1.start_time, end_time, timediff(start_time,end_time) as duration
    from cte1 inner join cte2 on cte1.r_no=cte2. r_no and
    cte1.ph_no=cte2. ph_no;