Answered step by step
Verified Expert Solution
Link Copied!

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.

  1. List all the rows of the departments table.
  2. Find the number of employees in the database (hint: use the COUNT() aggregate function for this); List the employees who:
    1. have a salary greater than 15000,
    2. were hired between January 1, 2002 and January 1, 2005,
    3. chave a phone number that doesn't start with 515
  3. 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.
  4. List the city, state and country name for all locations in the Asian region.
  5. List the locations that have no state or province specified in the database.
  6. Create a query to display the highest, lowest, sum and average salary of all employees. Label the columns Maximum, Minimum, Sum and Average, respectively.
  7. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions