Question
Q1 List all order numbers and their ship dates for orders shipped after March 15, 2018. Q2 List all customers that live in Massachusetts or
Q1 List all order numbers and their ship dates for orders shipped after March 15, 2018.
Q2 List all customers that live in Massachusetts or California. Show first and last name as well as city and state in your report, in three columns, e.g.
Tom Yates Dallas TX
Sort the results in ascending order by last name within state.
Q3 List the titles, retail price and discount for all books that contain the word cook in the title. Sort by cost.
Q4 Report all books published after Jan. 1st, 2015, as well as all books published in 2014 that have a retail price of $50 or less. Show the title, publisher's number, retail price and date published. The list should sort the data first by publisher number, then by retail price. two sets of data should be in the report: all books published after January 1st, 2015 as well as those books published in 2014 that have a retail price of $50 or less.
Q5 List titles, cost, retail and profit margin for all books that have a profit margin under 55%. Make sure to assign a descriptive column name for the calculated field. Profit margin is calculating by the following formula:
( (retail cost) / retail) *100
Q6(from textbook)- List the title and publish date of any computer book published in 2005. Perform the task of searching for the publish date by using three different methods: a) a range operator, b) a logical operator, and c) a search pattern operation.
AUTHORID | LNAME | FNAME |
---|---|---|
S100 | SMITH | SAM |
J100 | JONES | JANICE |
A100 | AUSTIN | JAMES |
M100 | MARTINEZ | SHEILA |
K100 | KZOCHSKY | TAMARA |
P100 | PORTER | LISA |
A105 | ADAMS | JUAN |
B100 | BAKER | JACK |
P105 | PETERSON | TINA |
W100 | WHITE | WILLIAM |
Table: | BOOKS |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
ISBN | VARCHAR2 | 10 | - | - | No |
TITLE | VARCHAR2 | 30 | - | - | Yes |
PUBDATE | DATE | 7 | - | - | Yes |
PUBID | NUMBER | 22 | 2 | 0 | Yes |
COST | NUMBER | 22 | 5 | 2 | Yes |
RETAIL | NUMBER | 22 | 5 | 2 | Yes |
DISCOUNT | NUMBER | 22 | 4 | 2 | Yes |
CATEGORY | VARCHAR2 | 12 | - | - | Yes |
QOH | NUMBER | 22 | 3 | 0 | Yes |
Table: | CUSTOMERS |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
CUSTOMER# | NUMBER | 22 | 4 | 0 | No |
LASTNAME | VARCHAR2 | 10 | - | - | No |
FIRSTNAME | VARCHAR2 | 10 | - | - | No |
VARCHAR2 | 40 | - | - | Yes | |
ADDRESS | VARCHAR2 | 20 | - | - | Yes |
CITY | VARCHAR2 | 12 | - | - | Yes |
STATE | VARCHAR2 | 2 | - | - | Yes |
ZIP | VARCHAR2 | 5 | - | - | Yes |
REFERRED | NUMBER | 22 | 4 | 0 | Yes |
REGION | CHAR | 2 | - | - | Yes |
Table: | ORDERITEMS |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
ORDER# | NUMBER | 22 | 4 | 0 | No |
ITEM# | NUMBER | 22 | 2 | 0 | No |
ISBN | VARCHAR2 | 10 | - | - | Yes |
QUANTITY | NUMBER | 22 | 3 | 0 | No |
PAIDEACH | NUMBER | 22 | 5 | 2 | No |
Table: | ORDERS |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
ORDER# | NUMBER | 22 | 4 | 0 | No |
CUSTOMER# | NUMBER | 22 | 4 | 0 | Yes |
ORDERDATE | DATE | 7 | - | - | No |
SHIPDATE | DATE | 7 | - | - | Yes |
SHIPSTREET | VARCHAR2 | 18 | - | - | Yes |
SHIPCITY | VARCHAR2 | 15 | - | - | Yes |
SHIPSTATE | VARCHAR2 | 2 | - | - | Yes |
SHIPZIP | VARCHAR2 | 5 | - | - | Yes |
SHIPCOST | NUMBER | 22 | 4 | 2 | Yes |
Table: | PROMOTION |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
GIFT | VARCHAR2 | 15 | - | - | Yes |
MINRETAIL | NUMBER | 22 | 5 | 2 | Yes |
MAXRETAIL | NUMBER | 22 | 5 | 2 | Yes |
Table: | PUBLISHER |
Column | Data Type | Length | Precision | Scale | Nullable |
---|---|---|---|---|---|
PUBID | NUMBER | 22 | 2 | 0 | No |
NAME | VARCHAR2 | 23 | - | - | Yes |
CONTACT | VARCHAR2 | 15 | - | - | Yes |
PHONE | VARCHAR2 | 12 | - | - | Yes |
Promotion
GIFT | MINRETAIL | MAXRETAIL |
BOOKMARKER | 0 | 12 |
BOOK LABELS | 12.01 | 15 |
BOOK COVER | 35.01 | 56 |
FREE SHIPPING | 56.01 | 999.99 |
Publisher
PUBID | NAME | CONTACT | PHONE |
1 | PRINTING IS US | TOMMIE SEYMOUR | 000-714-8321 |
2 | PUBLISH OUR WAY | JANE TOMLIN | 010-410-0010 |
3 | AMERICAN PUBLISHING | DAVID DAVIDSON | 800-555-1211 |
4 | READING MATERIALS INC. | RENEE SMITH | 800-555-9743 |
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