Ex 6
Ex 6
Note : The exercises that follow mostly uses system table ‘dual’. It is a table which is automatically
created by Oracle along with the data dictionary. Dual table has one column defined to be of varchar2
type and contains only one row with value ‘x’.
I. Date Functions
Syntax :
SELECT column, group_function(column)
FROM table
[WHERE condition]
[GROUP BY group_column_or_expression]
[HAVING group_condition]
[ORDER BY column];
SQL>
Q8) List the total salary, maximum and minimum salary and average salary of the
employees jobwise.
SQL>
Q9) List the total salary, maximum and minimum salary and average salary of the
employees jobwise, for department 20 and display only those rows having an
average salary > 1000.
SQL>
Q10) List the job and total salary of employees jobwise, for jobs other than
‘PRESIDENT’ and display only those rows having total salary > 5000.
SQL>