HackerRank Practice Sql 21 | Type of Triangle | SQL gold badge

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

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

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

    Super super super
    You teach us very understandable way
    Thank you so much 👍👍

  • @Vikasgupta-mw2my
    @Vikasgupta-mw2my 3 ปีที่แล้ว

    Please tell me what I do... For improving my skill..

  • @vinoddiwan5792
    @vinoddiwan5792 3 ปีที่แล้ว +5

    This is more easy
    ----The sum of the length of any two sides of a triangle is greater than the length of the third side.
    SELECT
    CASE
    WHEN A >= (B + C) OR B >= (A + C) OR C >= (A + B) THEN 'Not A Triangle'
    WHEN A = B AND A = C THEN 'Equilateral'
    WHEN A = B OR B = C OR A = C THEN 'Isosceles'
    ELSE 'Scalene'
    END
    FROM TRIANGLES;

  • @sajidulahmed3354
    @sajidulahmed3354 ปีที่แล้ว +2

    SELECT CASE
    WHEN (A+B>C) AND (B+C>A) AND (C+A>B) THEN
    CASE
    WHEN (A=B) OR (B=C) OR (C=A) THEN 'Equilateral'
    WHEN (A=B) OR (B=C) OR (A=C) THEN 'Isosceles' ELSE 'Scalene' END
    ELSE 'Not A Triangle' END
    FROM TRIANGLES;
    Please let me know what's wrong here.

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

    os ot possible i n mysql

  • @HIMANSHUSINGH-bw5zx
    @HIMANSHUSINGH-bw5zx 2 ปีที่แล้ว +1

    Hi mam i m writing my code below but there is an error coming error code : 1064 Check the manual that correspondant. Pls help
    select
    case
    when (a+b>c) and (a+C>b) and (b+c>a) then
    case
    when (a=b) and(b=c) and (c=a) then 'equilateral'
    when (a=b) or (b=c) or (c=a) or 'isosceles'
    else 'scelene' end
    end
    else 'not a triangle'
    end
    from Triangles

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

      For equilateral ,scalene ,isosceles use proper case which ever given in problem statement

  • @siddheswarnahak830
    @siddheswarnahak830 4 ปีที่แล้ว

    Hi i was solving a plsql questions in hackerrank but whenever i write plsql statement it is showing no output but when i write single line sql statement output is coming but it is wrong output. Can you help me on that plz.

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

    arrre arre madam thoda dhire aapne toh rail hi clla di