Aim:
             Explore the Aggregate Function functions using SQL queries.

Algorithm:

Step 1: Start the program. 

Step 2: Create the table SRMV using DDL command.

Step 3: Insert the value in SRMV table using DML command.

Step 4: Execute the aggregate operation sum(), max(), main(), avg(), count().

Step 5: Get the output.

Step 6: Stop the process.

Program:

create table srmv(St_Name varchar(25),St_Reg_no varchar(10),St_mark number(3),St_Class varchar(25),Subject varchar(10));

insert into srmv values('Arun','17UCA036',89,'II BCA','RDBMS');

insert into srmv values('Balu','17UCA025',79,'II BCA','RDBMS');

insert into srmv values('Chandhru','17UCA045',69,'II BCA','RDBMS');

insert into srmv values('Dheena','17UCA015',59,'II BCA','RDBMS');


insert into srmv values('Esha','17UCA050',89,'II BCA','RDBMS');

select * from srmv;


select sum(St_mark) from srmv;

select max(St_mark) from srmv;

select min(St_mark) from srmv;

select count(St_name) from srmv;

select avg(St_mark) from srmv;


Post a Comment

Previous Post Next Post