SQL TUTORIAL for Beginners | SUBQUERY in SQL

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

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

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

    Jazak Allah o khairah Sir g 🙏🙏🙏🙏 Thanks

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

    Query ❤
    owesome sir
    جزاك الله الخیرا

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

    Thank you so much sir 🔥👑

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

    Amazing sir g👌

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

    Sir g next video b send kr dy table and html ki jazakallah sir g plz

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

      Ek 2 din mn share ho jae gi in sha Allah..

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

    Allah Razi ho AP se

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

    Sir for count(hiredate).... & more than one value we want to know than what query will be written....
    For example we want 2 know the number of employees hired in 1981,81,83 so....????

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

      Good to see that you are curious to learn. This problem can be solved in many ways. One of them is to use a type conversion function. We can use TO_CHAR(Date, ' format') to convert date value in to character. So if we write TO_CHAR(hiredate, 'YY') it will return last two digits of any hire date like 81,82. And then we can compare these values by using in operator. Here is the final query that will give you the required result.
      select count (hiredate)
      from emp
      where TO_CHAR(hiredate, 'yy' ) in ( '81' , '82' , '83' ) ;
      Remember we are converting date to character value so we will use single quotes.

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

      @@tahirimtiaz okay thankewww sir