Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[6 points] Create and display the following table. Let the name of the table be products_tbl Table 1: products_tbl PROD_ID PROD_DESC COST ---------------------------------------------------------------------------- 11235 WITCH
- [6 points] Create and display the following table. Let the name of the table be products_tbl
Table 1: products_tbl
PROD_ID PROD_DESC COST
----------------------------------------------------------------------------
11235 WITCH COSTUME 29.99
222 PLASTIC PUMPKIN 18 INCH 7.75
13 FALSE PARAFFIN TEETH 1.1
90 LIGHTED LANTERNS 14.5
15 ASSORTED COSTUMES 10
9 CANDY CORN 1.35
6 PUMPKIN CANDY 1.45
87 PLASTIC SPIDERS 1.05
119 ASSORTED MASKS 4.95
- [10 points] Refer to Table 1. Write the statements which can provide the
- average cost of all the products
- count the number of items whose cost is greater than one and less than two
- Count the number of items whose cost is either between 10 and 15 (both inclusive) or between 3 and 8 (both inclusive).
- Count the number of items whose cost is either less than 5 or greater than 10.
- Maximum cost of all the products.
- Minimum cost of all the products.
- Sum cost of all the products.
- Nearest integer to the cost provided on the 3rd column.
- Truncate the value in the 3rd column.
- Find product IDs which are either 5 digits long or 3 digits long.
- [4 points] Add a fourth column on Table 1 and name it as STORES. Under this column, you can have the following list of entries stored.
PARTY CITY
TOYS R US
WALGREENS
WALMART
COSTCO
SAFEWAY
TRADER JOES
DOLLAR TREE
TARGET
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