Skip to Main Content
  • Questions
  • Looking for SQL Query to get below output

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: April 22, 2025 - 7:00 pm UTC

Last updated: April 23, 2025 - 8:06 am UTC

Version: Oracle 19C

Viewed 1000+ times

You Asked

Can someone please provide Oracle sql query to get below output?

Deptno Dept Name No. of emp
10 a 10
b 20
c 30
20 d 40
e 50
f 60
30 g 70
h 80
i 90

and Connor said...

Check out the KEEP clause