Aggregate functions in sql in tamil | group by and aggregate functions in sql | having clause in sql
ฝัง
- เผยแพร่เมื่อ 8 ต.ค. 2024
- #oracle#sql#sqltutorial
📌 Join WhatsApp chat for any Oracle SQL help or interview discussion
chat.whatsapp....
In this video, we’ll learn what the Oracle aggregate functions in sql in tamil. SQL Aggregate Functions - SUM, AVG, COUNT, MIN, MAX Functions
aggregate functions in oracle
aggregate functions in sql
aggregate functions in sql in tamil
group by and aggregate functions in sql
group by in sql
having clause in sql
group by clause in sql in tamil
group by clause in sql in tamil
ORA-00937: not a single-group group function
Notes:
drive.google.c...
drive.google.c...
Aggregate Functions:
select max(salary) from employees;
select min(salary) from employees;
select sum(salary) from employees;
select count(salary) from employees;
select avg(salary) from employees;
We should not select non-aggregate column with aggregate column.
select first_name,max(salary) from employees;
ORA-00937: not a single-group group function
whenever we want to use wise keyword, use group by.
Filter condition on resultant of group by clause - We have to use having clause.
Having clause is always come with group by group by + having
select department_id,sum(salary) from employees group by department_id;
The order of keywords in any oracle SQL statement.
1.from
2.where
3.group by
4.having
5.order by
*Complete 48 hours of Self-Paced Courses and Interview Questions Links:*
courses.nicitacademy.com/
Are you interested in joining my Live training? or Self-Paced course?
You can visit our website for more details.
www.nicitacademy.com/
Contact me for more details @ 🌕 wa.link/m4lat0
*WhatsApp group:*
chat.whatsapp.com/KMN5pKoLGSu8PuFLxSouB0
Thanks,
NiC IT Academy
=======================================================================
🔵Oracle SQL Tutorial - English
th-cam.com/play/PLsphD3EpR7F9mmtY2jBt_O8Q9XmvrhQEF.html
📌*IICS demo session:*
th-cam.com/video/C1zGVRFM3-A/w-d-xo.html
📌*Informatica Full Course:*
th-cam.com/video/V2FtZ_INmjg/w-d-xo.html
📌*SQL Full Course:*
th-cam.com/video/iuvzjf7nU1I/w-d-xo.html
📌*Informatica, IICS, and SQL playlist*
🌕 IICS Tutorial ENGLISH - Playlist
th-cam.com/play/PLsphD3EpR7F9sqnL3R0jeETHP08Touklj.html
🌕 Informatica training in ENGLISH - Playlist
th-cam.com/play/PLsphD3EpR7F9HtxQHfoRAStSWAuF7zBfd.html
🌕 Informatica Interview Preparation - ENGLISH
th-cam.com/play/PLsphD3EpR7F-z_PFoL-uFc9_4DEnYsR3d.html
🌕Oracle SQL - தமிழில்
th-cam.com/play/PLsphD3EpR7F-u4Jjp_3fYgLSsKwPPTEH4.html
🔵 Informatica training in தமிழில் - Playlist
th-cam.com/play/PLsphD3EpR7F8dOIX6bhpv3fnZ8Io_WrH3.html
🔵 Informatica Interview Preparation - TAMIL
th-cam.com/play/PLsphD3EpR7F8MoCdaGFY_xO7mMfT3fvnD.html
🔵Unix for Informatica Developer
th-cam.com/play/PLsphD3EpR7F8jeo31oVNJ0yG9AaD-5_jw.html
🌕Informatica Project videos
th-cam.com/play/PLsphD3EpR7F98r1Mp4QGT9iYmTNwyzPa6.html
Please subscribe, Like, and comment. I will post more videos.
Thanks
Sir நா உங்க பெரிய fan ❤❤❤ ✨⭐ ✨ ✨
Thank you Vijayarajan.
Sir, literally u r greatest. U r doing honesty for wt u doing with '0' error. U cleared many queries in this session which I had before. . . Chanceless sir u r 🔥🔥🔥
It's my pleasure. keep watchin my channel.
Superb 👍
Thank you! Cheers!
Can you please provide the query for 8) In which skillset, highest number of employees are working?
Good evening sir please help to find out the problem this , Write a query to find department which has lowers percentage(Employee Table)
sir, how to link the foreign key values with the child table representing the values
eg 10-sales 20-marketing
in another table
output
emp name1 10 sales
empname2 10 sales
empname 44 20 marketing
Please watch my SQL sessions 1 to 10 to understand fully.
Select Emp_name , Count (city_name) from employee group by Emp_name having count(City_name) order by Desc:
Sir do you upload the trigger video sir?
I will upload
Superb explanation sir where we can get the excel file? Description la irukka drive link it's not working
Thanks
1)SELECT COUNT(EMP_ID) FROM EMPLOYEE;
2)SELECT CITY_NAME,COUNT(EMP_ID) FROM EMPLOYEE GROUP BY CITY_NAME;
3)SELECT COUNTRY,COUNT(EMP_ID) FROM EMPLOYEE GROUP BY COUNTRY;
Good work 👍
eppty naan unkala contact pantrathu sir...?enaaku normalisation la doubt erukku sir.....ennoda answer crt aandu theriyala sir....plz reply
nicitacademy@gmail.com
🙏🙏🙏❤❤❤❤
8)Select skillset,count(*) as total employee from employees group by skillset order by 2 desc limit 1;
Kindly note Oracle Database does not have the LIMIT clause.
In the alias name no space allowed, count(*) as total employee. it should be count(*) as total_employee. Keep try. Happy learning.
Bro i need to find the department id of student who have more marks on maths!! Answer sollunga
Please watch all my SQL sessions and practice it.
👍
Thanks
4)SELECT COUNTRY,COUNT(EMP_ID) FROM EMPLOYEE GROUP BY COUNTRY HAVING COUNTRY="INDIA";
Good work
@@NICITACADEMY Sir, in having, aggregation function should only filter it, having country = 'india' is a non-aggregation column , is it possible ?
I cant find 8th ques sir
Kindly practice all the queries. I will post answer. Keep learning.
Please help me, I couldn't solve 8) In which skillset, the highest number of employees are working?
1) Find the total number of employees?
select count(emp_name)
from emp_test;
2) Find the city-wise total number of employees?
select city_name,count(emp_name)as Total_emp
from emp_test
group by city_name;
3) Find the total number of employees in each country?
select country,count(emp_name)as Total_emp
from emp_test
group by country;
4) Find the total number of employees in India?
select country,count(emp_name)as Total_emp
from emp_test
where country='india'
group by country;
5) Find the cities where more than 3 employees are working in India?
select city_name,count(emp_name)as Total_emp
from emp_test
where country='india'
group by city_name
having count(emp_name)>3
6) who is the youngest person?
select Emp_name,Dob from emp_test
where dob=(select max(dob)from emp_test);
7) who is the eldest employee?
select Emp_name,Dob from emp_test
where dob=(select min(dob)from emp_test)
9) Is there any employee with the same name?
select emp_name, count(*) from emp_test
group by emp_name
having count(*)>1 ----Answer is Yes
10) is there any duplicate employee_id?
select emp_id, count(*) from emp_test
group by emp_id
having count(*)>1 -----Answer is NO
Hi Raja, I highly appreciate your effort and answers. for the 8th question, I will make one more video, so that you can solve that. Keep try and give me for some more time to publish. :)
select * from
(select skillset,count(*) from employee_skills group by skillset order by 2 desc) where rownum
-- select the top 3 working skillset based on employee count
select * from
(select skillset,count(*) from employee_skills group by skillset order by 2 desc) where rownum
@@NICITACADEMY if suppose any 2 of the jobskills having same number of highest employees then how will write the query ,need your answers
@@NICITACADEMY If we don't know about the skillet having more than one highest values ,in this query the row num returns single value only then how will find another highest values