MySQL - Functions - Worksheet
MySQL - Functions - Worksheet
a) SELECT POW(2,3);
g) select dayofmonth(curdate());
h) select truncate(2345.456789.2)
1. if the date of joining is not a Sunday, then display it in the following
2. Display the names of the employees who joined in the month of December.
3. Display the age of the employee at time of joining. [approximate age]
4. Display the present age of the employee.
5. select max(year(DOB)) from emp;
6. Display the total amount spent on salary.
7. Display the employee names who joined in oct month
8. Display the last 3 characters of employee name
1. Display the length of the email and part of the email from the email ID before the character
‘@’. Note - Do not print ‘@’.
2. Display four digit area code is reflected in the phone number starting from position number
3. For example, 1851 is the area code of mobile number 9818511338. Now, write the SQL
query to display the area code of the customer.
3. Display emails after removing the domain name extension “.com” from emails of the
customers
5. Display the department names which contain more than one doctor .