Question

Using the below Relational Design from Oracle SQL data modeler, provide sql script for the following queries (note please be sure to include "PART3.Table_name" when pulling info from specific tables)

Query 6: How many orders are there by customer and what is the total sales and total profit sorted by customer’s total number of orders?

Query 15: What is the total number of orders by shipping class?

Query16: What are the monthly total sales from 2013 to 2014?

Query 17: What customers have same day shipping from 2013 to 2016?

> - - - - - - - - - - - - - PART3.SHIPPING * SHIPMENT_ID NUMBER * SHIP_DATE DATE SHIP_MODE VARCHAR2 (20 BYTE) ORDER_ID VARCHA

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Query 15 :

select count(*) from PART3.SHIPPING

count will return the rows in a relation (table)

Add a comment
Know the answer?
Add Answer to:
Using the below Relational Design from Oracle SQL data modeler, provide sql script for the following...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For each city, list number of customers from the city, who have placed order(s). Cities are...

    For each city, list number of customers from the city, who have placed order(s). Cities are listed in ascending alphabetical order. Use equal join for this query. CREATE TABLE customer ( cust_id number(11,0) not null, cust_name varchar2(25) not null, street varchar2(30), city varchar2(20), state varchar2(2), zipcode varchar2(5), CONSTRAINT customer_pk PRIMARY KEY (cust_id) ); CREATE TABLE ordertable ( order_id number(11,0) not null, order_date date, cust_id number(11,0), CONSTRAINT order_pk PRIMARY KEY (order_id), CONSTRAINT order_fk FOREIGN KEY (cust_id) REFERENCES customer (cust_id)); CREATE TABLE...

  • I am using oracle sql developer to create some queries to generated reports and it is...

    I am using oracle sql developer to create some queries to generated reports and it is not working. I am not sure how to use count, group by, and order by. Help me fix my query and explain to me how you did, so can do it next time. Also, I have to convert this query to a stored procedure, so can you help me do it too? Here is my query: SELECT COUNT(GUEST.FIRSTNAME), GUEST.FIRSTNAME, GUEST.LASTNAME, GUEST.GUESTTYPE, RESERVATION.RESERVATIONDATE, GUEST.EMAIL, FROM...

  • QUESTION 9 You plan to query data using the TRANS_HIST_V view that was created by another...

    QUESTION 9 You plan to query data using the TRANS_HIST_V view that was created by another user in their schema. Which statement is true? A. The Oracle Server will retrieve the view definition from the ALL_VIEWS data dictionary view. B. The Oracle Server will retrieve data, determined by the query criteria, from the TRANS_HIST_V view. C. The Oracle Server will verify whether you have been granted access privileges to the TRANS_HIST_V view. D. The Oracle Server will automatically reset the...

  • For the following tasks, your SQL must correctly manage transactions and use sequences to generate new...

    For the following tasks, your SQL must correctly manage transactions and use sequences to generate new primary keys for numeric primary key values (under no circumstances may a new primary key value be hardcoded as a number or value) (i) Create sequences which will allow entry of data into the AW_STATUS, AW_DISPLAY and SALE tables - the sequences must begin at 300 and go up in steps of 1 (i.e., the first value is 300, the next 301, etc.) (ii)...

  • Provide the syntax answers for the following script, doesn't matter what table or columns. CREATE TABLE...

    Provide the syntax answers for the following script, doesn't matter what table or columns. CREATE TABLE customer (c_id NUMBER(5), c_last VARCHAR2(30), c_first VARCHAR2(30), c_mi CHAR(1), c_birthdate DATE, c_address VARCHAR2(30), c_city VARCHAR2(30), c_state CHAR(2), c_zip VARCHAR2(10), c_dphone VARCHAR2(10), c_ephone VARCHAR2(10), c_userid VARCHAR2(50), c_password VARCHAR2(15), CONSTRAINT customer_c_id_pk PRIMARY KEY (c_id)); CREATE TABLE order_source (os_id NUMBER(3), os_desc VARCHAR2(30), CONSTRAINT order_source_os_id_pk PRIMARY KEY(os_id)); CREATE TABLE orders (o_id NUMBER(8), o_date DATE, o_methpmt VARCHAR2(10), c_id NUMBER(5), os_id NUMBER(3), CONSTRAINT orders_o_id_pk PRIMARY KEY (o_id), CONSTRAINT orders_c_id_fk FOREIGN...

  • An online company sells hundreds of office supply products on its e-Commerce store. It has asked...

    An online company sells hundreds of office supply products on its e-Commerce store. It has asked you to design and implement a sales order processing system which will be used by users in our Operations department to process sales orders. Here is an overview of the sales order process. Customers make purchases by placing orders. Each customer has a customer number and profile (such as name, shipping address). To simplify the matter, each time an order is placed, only one...

  • Write SQL statements to answer the following questions using Assignment 3’s schema (tables from part 1)....

    Write SQL statements to answer the following questions using Assignment 3’s schema (tables from part 1). 1- Find how many branches had have loans over $2000.00. 2- For each branch, find the most expensive loan. Your output should include Branch Id, loan amount for the highest loan for that Branch. 3- Find how many accounts there are for each customer. The output should include customer id and number of accounts for that customer. 4- Find the total balance amount of...

  • * myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...

    * myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...

  • I NEED TO WRITE THE FOLLOWING QUERIES IN MYSQL (13)Next, grant to a user admin the read privileges on the complete descr...

    I NEED TO WRITE THE FOLLOWING QUERIES IN MYSQL (13)Next, grant to a user admin the read privileges on the complete descriptions of the customers who submitted no orders. For example, these are the customers who registered themselves and submitted no orders so far. The granted privilege cannot be propagated to the other users. 0.3 (14)Next, grant to a user admin the read privileges on information about the total number of orders submitted by each customer. Note, that some customers...

  • DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS order_details; DROP...

    DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS order_details; DROP TABLE IF EXISTS items; DROP TABLE IF EXISTS artists; DROP TABLE IF EXISTS employees; -- create tables CREATE TABLE customers (    customer_id INT ,    customer_first_name VARCHAR(20),    customer_last_name VARCHAR(20) NOT NULL,    customer_address VARCHAR(50) NOT NULL,    customer_city VARCHAR(20) NOT NULL,    customer_state CHAR(2) NOT NULL,    customer_zip CHAR(5) NOT NULL,    customer_phone CHAR(10) NOT NULL,    customer_fax CHAR(10),    CONSTRAINT customers_pk...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT