ETL Testing | Complex SQL Interview Questions & Answers | Correlated subquery and decode function

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

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

  • @SurajNaik5459
    @SurajNaik5459 Год назад +2

    One of the best guide .....

  • @CK-ir2ke
    @CK-ir2ke 2 года назад +2

    You are the full stack ETl guru sir

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

    Hetu ji,
    Can you please verify if we can also use below query for the 4th question:
    select salary,dept from (select salary,dept,ROW_NUMBER() over(partition by dept order by salary desc) as rn from emp)where rn=2;

  • @surajpatil3579
    @surajpatil3579 2 года назад

    & finally understood the use of decode function 👍keep making content like this

  • @shireenjm7159
    @shireenjm7159 2 года назад +2

    Yeah, It's very important questions in interview. So useful sir
    Can u also explain using substring questions. For example visayaa.
    In these, a is reapting thirce.
    Question is
    Count of A
    Have to print A alone

    • @etlqalabs5048
      @etlqalabs5048  2 года назад

      Please check this .it can clarify some of your questions
      ruclips.net/video/Ig8WDO9vqhQ/видео.html

    • @vivekshinde8746
      @vivekshinde8746 2 года назад

      LENGTH('VISAYAA') - LENGTH (REPLACE('VISAYAA', 'A', '')

    • @Sathwika13
      @Sathwika13 2 года назад

      Select * from dual where REGEXP_LIKE('VISAYAA','^A');

    • @Sathwika13
      @Sathwika13 2 года назад

      For count of A
      We can do using length

  • @pradeepk5642
    @pradeepk5642 2 года назад

    super sir. Thanks for this video .

  • @dm3315
    @dm3315 2 года назад +3

    Hi sir, For 2nd ques what happens if we put below query
    Select * from emp where sal > band_max_sal;

  • @arshiyamohammed1914
    @arshiyamohammed1914 2 года назад +1

    For 3rd question
    Select * from emp Max(sal) group by dept; can't we write this if we want to display all the columns of table

    • @Sathwika13
      @Sathwika13 2 года назад

      Select * from where dept_no in
      (
      Select dept_name,max(emp_sal) from employee group by dept_name);

  • @rock__14
    @rock__14 2 года назад +1

    Hi Sir, for the last question we can use Union All function right.?
    Decode will decode the data so I think it might give wrong ans if we mention multiple columns in select statement.
    Please correct me if I'm wrong.

    • @etlqalabs5048
      @etlqalabs5048  2 года назад +1

      Actually good attempt but union all is similar to union which will result the output in ascending order but our requirement is to display in the order like
      1
      3
      2
      So we have to used decode in order by clause

  • @007satyajit
    @007satyajit 2 года назад

    Why we need to case or decode in order by
    We can use in select list

  • @Sathwika13
    @Sathwika13 2 года назад

    Sir,
    Please explain about
    Difficult Bug handled so far
    Difficult transformation rule you have felt so far
    Production error and root cause analysis

  • @shivanandharavi9899
    @shivanandharavi9899 2 года назад +1

    Sir please explain about string functions

    • @etlqalabs5048
      @etlqalabs5048  2 года назад

      Please watch this
      ruclips.net/video/Ig8WDO9vqhQ/видео.html

  • @shivanandharavi9899
    @shivanandharavi9899 2 года назад

    Sir ple explain about subquery topic.. 🙏

  • @manaskumarsahoo162
    @manaskumarsahoo162 2 года назад

    HI SIR please help me a question answer
    1-find out nth highest highest salary deptment wise using dense rank() and not using dense rank ?

  • @kartikjuneja7807
    @kartikjuneja7807 2 года назад

    Hello Sir,
    could we use subquery with not in for 2nd max salary.

    • @etlqalabs5048
      @etlqalabs5048  2 года назад +1

      Yes - you can use "not in" instead < , both will yield same result