AMAZON Interview Question | SQL Intermediate Question 9

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

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

  • @zaravind4293
    @zaravind4293 10 месяцев назад

    Great work pls keep posted this type of interview questions

  • @ajaykrishnanj5633
    @ajaykrishnanj5633 7 месяцев назад +1

    select * from (
    select *,ROW_NUMBER() over(partition by flagtab.concat order by n) as flag from (
    select *,
    case when n>m then CONCAT(n,m) else CONCAT(m,n) end as concat
    from tb1) as flagtab)as new where new.flag=1