Write query to display first name and last name as full name

Assignment Help Database Management System
Reference no: EM13850701

PART 1

1. Display first name ,last name and salary from s_emp where salary should display in the format $99,999;

2. Write query to display first name and last name as full name, salary *12+ commission_pct *salary as Total Salary from s_emp.If commission_pct *salary is null then consider it as zero use nvl function;

3. select to_char(sysdate,'YYYY') C1,to_char(sysdate,'YEAR') C2,to_char(sysdate,'MM') C3,to_char(sysdate,'DY') C4,to_char(sysdate,'DAY') C5 from dual;

4. write query to display employee name ,job, salary and revised salary from s_emp
If job is ANALYST then revised salary = salary*1.03
If job is MANAGER then revised salary = salary*1.1
If job is PRESIDENT then revised salary = salary*1.01
Else display revised salary = salary
(Use decode function)

5. display first name , last name as full name ,title , salary and revised salary from scott.s_emp table
If title is 'Sales Representative' then make revised salary = salary*1.03
If 'VP, Administration' then make revised salary = salary*1.02
If 'Warehouse Manager' then make revised salary = salary*1.1
If 'Stock Clerk' then make revised salary = salary*1.01
Else display revised salary = salary*1.05
(Use case function)

6. Display word "gOwoLFpack" in 3 ways by using Initcap , upper and lower functions;

7. select substr('ABCDEFG',0) S1,substr('ABCDEFG',1) S2,substr('ABCDEFG',4) S3,substr('ABCDEFG',4,3) S4,substr('ABCDEFG',-5) S5,substr('ABCDEFG',-5,4) S6,substr('ABCDEFG',-5,10) S7,substr('ABCDEFG',-5,-1) S8 from dual;

8. Display salary and if salary is null display commission and if both are null display 0 using coalesce function from s_emp ;

PART 2


1. Display Firstname , Lastname together with Alias as Fullname from student table.

2. Display employee name , commission and salary+10*commission as Total from scott.emp

3. Select unique deptno with job from scott.emp.

4. Select all the columns from scott.emp where sal is greater than equal to 1500

5. select only employee name from scott.emp whose employee number is less than 7782;

6. Select employee name from scott.emp where employee number is not equal to 7782;
7. Select employee name from scott.emp whose hiredate is 17th dec 1980.

8.select ename,sal,comm from scott.emp where 1=2;

9. select ename,sal,comm from scott.emp where 2=2;

10. select employee name , salary , commission from scott.emp where employee number is greater than 0

11. select ename,sal,comm from scott.emp where comm=comm;

12. Select employee name , salary and commission from scott.emp whose salary is less than equal to commission

13. By using IN operator in the where condition , display employee name , salary and job from scott.emp where jobs are in 'CLERK','SALESMAN','ANALYST'

14. By using between in where condition display employee name , salary from scott.emp where salary is between 1000 and 1500

15. Display employeenumber , employee name from scott.emp where employee name starts with letter M
16. Display employee name , salary , job from scott.emp where job is SALESMAN or PRESIDENT and salary is greater than 1500

 

 


Attachment:- New WinRAR archive.rar

Reference no: EM13850701

Questions Cloud

The carrier frequency : The output voltage of an AM transmitter is given by 500(1+.4sin3140t)sin6.28x107t. This voltage is fed to a load of 800 ohms. Determine the following. The carrier frequency The modulating frequency
What do you think googles rationale was for starting books : What do you think Google's rationale was for starting its Google Books library Project? Of all the issues discussed in this case, which issue is the most disconcerting to you. Why?
Identify the strengths and weakness of the nist programs : Compare the ISO/IEC 27001 outline with the NIST documents discussed in this chapter. Which areas, if any, are missing from the NIST documents? Identify the strengths and weakness of the NIST programs compared to the ISO standard.
Identify at least one shift of the supply curve : Explain why you have categorized these selected principles or concepts as microeconomics or macroeconomics. Identify at least one shift of the supply curve and one shift of the demand curve in the video.
Write query to display first name and last name as full name : Write query to display first name and last name as full name
List the current product lines for your chosen company : List the current product lines for your chosen company. Think of at least one idea each for new products that the company could add to its product offerings
Explain why it is important to deliver a comprehensive scope : Explain why it is important to deliver a comprehensive scope statement at the beginning of the project. Are there any instances where the scope statement can or should be omitted
Discusses the issues that may arise in a corporation : You are to write an essay (min 500 words) that discusses the issues that may arise in a corporation as it strives to be more entrepreneurial, and as it conducts business in general
What circumstances wold actual government spending : Why does the budget require a forecast of the economy. Under what circumstances wold actual government spending and tax revenue fail to match the budget as approved

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd