Contoh Penggunaan QUERY (ORACLE)

SELECT Department_Id, MAX(Salary) "Salary Tertinggi", MIN(Salary) "Salary Terendah", AVG(Salary) "Salary Rata-Rata" FROM Employees GROUP BY Department_Id

SELECT AVG(Salary) "Salary Rata-Rata", COUNT(Job_Id) "Jumlah Karyawan" FROM Employees


SELECT Department_Id, Job_Id,  SUM(Salary) "Total Salary" FROM Employees WHERE Department_Id BETWEEN 10 AND 50 GROUP BY Department_Id, Job_Id

SELECT Department_Id, AVG(Salary) "Salary Rata-Rata", COUNT(Job_Id) "Jumlah Karyawan" FROM Employees GROUP BY Department_Id HAVING COUNT(Job_Id)>=2

SELECT Job_Id, MIN(Salary), MAX(Salary), SUM(Salary), AVG(Salary), COUNT(Job_Id) FROM Employees WHERE Job_Id IN ('SH_CLERK','PU_CLERK') GROUP BY Job_Id HAVING AVG(Salary)>=8000
Hehehe tidak ada gambar

Postingan terkait:

Belum ada tanggapan untuk "Contoh Penggunaan QUERY (ORACLE)"

Post a Comment