Module 4 Assignment - SQL
Module 4 Assignment - SQL
Problem Statement:
You have successfully cleared your 3rd semester. In the 4th semester, you will work with inbuilt functions
and user-defined functions
Tasks to be done:
1. Use the inbuilt functions and find the minimum, maximum and average amount from the orders
table
2. Create a user-defined function, which will multiply the given number with 10
3. Use the case statement to check if 100 is less than 200, greater than 200 or equal to 2oo and
print the corresponding value
Solutions
1.
RESULT
MAX_AMT
200
RESULT
MIN_AMT
100
/2
RESULT
AVERAGE
137
(FOR REFERENCE PURPOSE ONLY Orders table details are shown below)
2.
PRINT DBO.MULTIPLY_BY_10(20)
3.
RESULT
result
input is less than 200