КОМЕНТАРІ •

  • @user-bg1bn7np4u
    @user-bg1bn7np4u 5 місяців тому +2

    Nice explanation.please come up with more such questions

    • @datasculptor2895
      @datasculptor2895 5 місяців тому +1

      Sure. Do watch other videos as well in my channel

  • @joemoneyweather4437
    @joemoneyweather4437 Місяць тому

    With cte as
    (
    select A,B, lead(B) over (order by (select 1))C,
    Shipments,
    lead(Shipments) over (order by (select 1))D,
    Shipments + lead(Shipments) over (order by (select 1))Total_Shipments
    from shipments
    )
    Select A,B,Total_Shipments
    from cte
    where A=C

  • @mohammedvahid5099
    @mohammedvahid5099 5 місяців тому

    Please do more videos on interview real time scenarios

    • @datasculptor2895
      @datasculptor2895 5 місяців тому

      Sure. Please subscribe and stay tuned. More videos coming soon 😊

  • @DE_Pranav
    @DE_Pranav Місяць тому

    select LEAST(A,B) as A, GREATEST(A,B) as B, sum(Shipments) as total_shipments from shipment
    group by LEAST(A,B) , GREATEST(A,B)

  • @anilkumark3573
    @anilkumark3573 9 днів тому

    select i.a, i.b,
    sum(case when e.a = i.a and e.b = i.a then e.shipments + i.shipments end) as total_shipments
    from exp_imp e join exp_imp i
    on e.a = i.b and e.b = i.a
    and e.shipments < i.shipments
    group by i.a, i.b