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....????
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.
Jazak Allah o khairah Sir g 🙏🙏🙏🙏 Thanks
Query ❤
owesome sir
جزاك الله الخیرا
Thank you so much sir 🔥👑
Most welcome
Amazing sir g👌
Sir g next video b send kr dy table and html ki jazakallah sir g plz
Ek 2 din mn share ho jae gi in sha Allah..
Allah Razi ho AP se
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....????
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.
@@tahirimtiaz okay thankewww sir