THE BLUNDER SQL HACKERRANK

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2020

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

  • @immythic8351
    @immythic8351 2 ปีที่แล้ว

    Thank you ma'am and Merry Christmas!

  • @udayptp
    @udayptp 3 ปีที่แล้ว +6

    You cleared my doubt , I was using round function instead of ceil function. round(avg(salary) -avg(replace(salary, 0,''), 0) but I was getting error. Thanks

  • @garimakushwaha8465
    @garimakushwaha8465 8 หลายเดือนก่อน +1

    REPLACE is a string function and the type of the salary column is integer so why do we use the replace function? and here 0 is not a character of a string so how it can be replaced with an empty string?

  • @bhuppidhamii
    @bhuppidhamii 5 หลายเดือนก่อน

    THANK U, I WAS STUCK WITH PROBLEM FROM LONG TIME

  • @SivaKumar-ef5oz
    @SivaKumar-ef5oz 2 หลายเดือนก่อน

    I need complete SQL course serious

  • @fazal179
    @fazal179 ปีที่แล้ว

    SIMPLE SOLUTION THANKS ...:)

  • @Aysh_Sach_16-2
    @Aysh_Sach_16-2 2 ปีที่แล้ว

    also theory questions of DBMS?

  • @sh4r9
    @sh4r9 ปีที่แล้ว +1

    how to do that in ms sql server.. im getting error that Operand data type varchar is invalid for avg operator.

    • @Avadhut-nd9yz
      @Avadhut-nd9yz ปีที่แล้ว

      /* This will do the trick for MS SQL server */
      select ceiling(avg(salary) - avg(cast(replace(salary, 0,'') as int)))+1 from EMPLOYEES;

  • @akashab
    @akashab 8 วันที่ผ่านมา +1