how to you show minimum and maximum salary in a single query
vinoth perumal
1y
select d.department_id,d.department_name,max(e.salary),min(salary) from
emp e join departments d
on e.department_id =d.department_id
group by d.department_id , d.department_name;
ROBERT ANTONY.A 21BCG015
1y
BY using aggregate function of min() and max() we can find the minmum salary and maximum in a single query.
select min(salary) as minimum_salary from table_name;
select max(salary) as maximum salary fro...read more
Help your peers!
Add answer anonymously...
Popular interview questions of SQL Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app