Question: Can someone Help me to solve this: SQL > DESC employees Name Null? Type-------------------------EMPLOYEE_ID not NULL Number SQL > DESC departments Name Null? Type-------------------------DEPARTMENT_ID not

Can someone Help me to solve this:

  1. SQL > DESC employees Name Null? Type-------------------------EMPLOYEE_ID not NULL Number

    SQL > DESC departments Name Null? Type-------------------------DEPARTMENT_ID not NULL Number

    Consider the following query

    SELECT department_name FROM department d INNER JOIN employees e ON (d.employees_id = e.employee_id) GROUP BY department_id;

    Which of the following queries can replace the above query by using sub-queries giving the same result?

    1. SELECT department_name FROM departments WHERE department_id = (SELECT distinct(department_id) from employees);
    2. SELECT department_name FROM departments WHERE department_id = ANY (SELECT distinct(department_id) from employees);
    3. SELECT department_name FROM departments WHERE department_id ANY (SELECT distinct(department_id) from employees);
    4. SELECT department_name FROM departments WHERE department_id = IN (SELECT distinct(department_id) from employees);
  2. In Oracle SQL Display the order id, the total number of products, and the total order amount for orders with the total amount below $350,000. Sort the result based on the total amount from the high to low values.
  3. In Oracle SQL: Considered the table structures that you need in this question are the same of DBS311: Write a SQL query to show the total number of the warehouses for each postal code with the state name is ABC(Use sub query
  4. In Oracle: Write a SQL query to display product name and list price for product in category 1 which have the list price less than the lowest list price in ANY category. Sort the output by top list price first and then by product ID.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!