Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a file to record SQL queries, results and explanations on following questions. Upon the completion of lab works, convert the file to LAB02.PDF and
Create a file to record SQL queries, results and explanations on following questions. Upon the completion of lab works, convert the file to LAB02.PDF and submit to blackboard.
- List all the rows of the departments table.
- Find the number of employees in the database (hint: use the COUNT() aggregate function for this); List the employees who:
- have a salary greater than 15000,
- were hired between January 1, 2002 and January 1, 2005,
- chave a phone number that doesn't start with 515
- List the names of the employees who are in the finance department. Try to format the names as firstname lastname using concatenation (i.e., ||) and order them alphabetically.
- List the city, state and country name for all locations in the Asian region.
- List the locations that have no state or province specified in the database.
- Create a query to display the highest, lowest, sum and average salary of all employees. Label the columns Maximum, Minimum, Sum and Average, respectively.
- Oracle provides a default table named dual, which you can use to verify that Oracle is up and running. Try to figure out the schema and the data values stored in dual. Give examples of why one might want to user such a table.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started