Remedial Sheet of ASQL Unit I 1. 2. 3. 4. With examples explain any five aggregate functions. With examples explain any five string functions. What are views? Explain its types with example Explain following constraints with example. a. Primary key b. Foreign key c. Unique d. Not null e. Check 5. Write SQL statements for the following employee table. 6. WSN on sequences 7. WSN on indexes 8. Explain outer join with the example 9. Explain different types of DDL statements with the help of example 10. With example explain any five numeric function 11. Explain the concept of sequences, synonyms and indexes with example. 12. Write sql statement for the following Books: (Bookid,authored,price,category,publication_name) i. Display minimum price of book ii. List the name of all books title in descending order iii. Display name of book having maximum price iv. Display book information only for ‘Navneet’ and ‘Chetana’ publication book v. List those books where title start with’B’and ends with’H’ 13. Explain different types of DML ststements with example 14. Define joins with its types Unit II 1. 2. 3. 4. 5. 6. 7. Explain multiple column sub queries with example. Explain grouping by roll up with example. Explain set operators with example. Explain correlated sub queries with example. Explain WITH CLAUSE with example. How do you revoke privileges from the other users Consider the employee table given below and solve the queries given below. a. Find out average salary of all employees who are earning more than employees of ACCOUNTING dept 8. 9. 10. 11. b. Find out sal, name of employee from those dept which has same no of clerks as in ACCOUNTING dept c. Find total salary of all employees of dept 10 whose job is not same as employee of dept 30 d. Find sal, name of employee who are earning more than highest paid employee of dept 10 e. Find name, job, sal of those employee whose job is same as that of FORD f. Find name, job, deptno and salary of those employee who are either having same job as JONES or who are earning same or more salary than FORD g. Find the names and jobs of those employee from dept 10 whose job is same as any employee from sales dept h. Find all employees with same job as JONES i. List name, job, salary of employees in dept 20 who have same job as employee in dept 30 order the list by salary j. Find all the employees who earn more than average salary of employees in their own depts, list dept in order k. Find the employees whose salary is equal to that of SCOTT or WARD. Explain any five Date time functions with examples. Explain concept of sub queries in FROM clause with example Explain Grouping by cube with example How do you grant privileges to other users explain with example Unit III 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Explain PL/SQL Block structure WSN on %TYPE attribute with example Write a PLSQL block to calculate the cube of a number accepted from user. Write a PLSQL block to display maximum salary of an employee table What are different types of comments in PLSQL Block List advantages of PL/SQL Block WSN on Bind Variable WSN on Commit and rollback How to invoke select statement in PL/SQL block? Explain with the help of example Write a PLSQL block to calculate the square of a number accepted from user. Explain type of PL/SQL block How to use nested block in PL/SQL? Explain with example Write PL/SQL Block to calculate area of the circle where redious is entered by the user Write a short note rollback and save point What are different data type in PL/SQL Unit IV 1. Explain INDEX by table with the help of example 2. Explain cursor for loop with example 3. WSN on PLSQL Records 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. What are different attributes of Implicit cursor What are different attributes of Explicit cursor WSN on conditional Statement Explain user defined exception with example Write a PL/SQL block to calculate the summation of all numbers between 1 and 20. Write a PLSQL block to display the prime number between two numbers accepted from user(range between) Write a PL/SQL block to calculate the factorial of a number entered by a user Write a PL/SQL block to find the grade of a student of 5 subjects and roll number. Explain various looping constructs in PL/SQL Explain different attribute of explicit cursors Explain update clause and where current clause with example Write a PL/SQL block to print odd numbers between 1 to 100. Write a PL/SQL Block to print even number between 1 to 100 Unit V 1. Write a procedure to add two numbers passed from the calling PL/SQL block.The addition is done in the procedure but display of the sum is done in the calling program 2. Write a procedure to pass a number from the calling Pl/SQLblock,increment it by 10 and display the updated value in the calling PL/SQL block. 3. Write a non stored procedure which adds two numbers. The coding and the calling of the procedure is in the same PL/SQL block. 4. Write a function that returns the square of a number. 5. Write a function that returns the greatest of two numbers supplied by the calling program. 6. Write a PLSQL function to find the average of three numbers. 7. WSN on Packages & its components 8. Explain different types of parameter modes in a procedure 9. List advantages of packages. 10. Differentiate between stored procedures and functions Unit VI 1. 2. 3. 4. 5. 6. 7. 8. 9. List differences between cursor ,procedures & functions. Give the syntax of AFTER UPDATE TRIGGER & explain with the help of example WSN on mutating trigger Create a trigger with name ‘CAPITALIZE TRIGGER’ to capitalize the name of the employee table. What are different types of triggers State use of NEW and OLD qualifier in trigger WSN on compound trigger Give the syntax of BEFORE UPDATE TRIGGER & explain with the help of example WSN on conditional trigger 10. Write a trigger to do the following if new record is inserted in HmtEmp table the new values are inserted in duplicate table or If a record is updated in HmtEmp table the old values are copied to the duplicate table or If a record is deleted from HmtEmp table the record is copied to duplicate table 11. Explain basic parts of triggers 12. Write a procedure to add two numbers passed calling PL/Sql Block.The addition is done in the procedure but display of sum is done in calling program. 13. Create PL/SQL function to find out greatest of two numbers. Call the function to display out put. 14. Differentiate between Anonymous Block and subprograms. 15. List advantages of procedure and functions. 16. What are the restriction for calling function