Question: Multiple choice. Select the correct letter only. 1. How many rows does the following query produce in the report? select * from sq.employee_donations, sq.employees; employee_donations

Multiple choice. Select the correct letter only.

1. How many rows does the following query produce in the report?

select * from sq.employee_donations, sq.employees;

employee_donations

Employee_ID Qtr1 Qtr2 Qtr3 Qtr4
120265 . . . 25
120267 15 15 15 15
120269 20 20 20 20
120270 20 10 5 .

employees

Employee_ID Name
120265 Panagiotis
120267 Emma
120269 Fatima
120270 Sofia
120272 Owen

a. 4
b. 5
c. 9
d. 20

2. Which code produces a report of only the matches from the employee_donations and employees tables? The results should include each column once.

employee_donations

Employee_ID Qtr1 Qtr2 Qtr3 Qtr4
120265 . . . 25
120267 15 15 15 15
120269 20 20 20 20
120270 20 10 5 .
120280 20 10 10 30

employees

Employee_ID Name
120265 Panagiotis
120267 Emma
120269 Fatima
120270 Sofia
120272 Owen

a.
select Employee_ID, Qtr1, Qtr2, Qtr3, Qtr4, Name from employee_donations as d inner join employees as e on Employee_ID=Employee_ID;
b.
select e.Employee_ID, Qtr1, Qtr2, Qtr3, Qtr4, Name from employee_donations as d inner join employees as e

3.Which result set does the following inner join produce?

select p.Prod_ID, Color, Price from products as p inner join saleitems as s on p.Prod_ID=s.Prod_ID;

products

Prod_ID Color
1 Blue
2 Red
3 Red
. Green
. Blue

saleitems

Prod_ID Price
1 12.99
4 45.99
. .99
. 1.99

a. Result Set 1
Prod_ID Color Price
1 Blue 12.99
. Green .99
. Green 1.99
. Blue .99
. Blue 1.99
b. Result Set 2
Prod_ID Color Price
1 Blue 12.99
. Green .99
. Blue 1.99
c. Result Set 3
Prod_ID Color Price
1 Blue 12.99

4.

Using the products and producttiers tables, complete the following program to produce the desired results of a product and its tier.

select p.Prod_ID, Price, Tiers from products as p inner join productTiers as t on _________________ order by p.Prod_ID;

products

Prod_ID Price
1 125.99
2 90.99
3 1.99
4 11.99
5 1099.99
6 10.99

producttiers

Tiers Low High
Tier 1 0 9.99
Tier 2 10 99.99
Tier 3 100 9999.99

Desired Results

Prod_ID Price Tiers
1 125.99 Tier 3
2 90.99 Tier 2
3 1.99 Tier 1
4 11.99 Tier 2
5 1099.99 Tier 3
6 10.99 Tier 2

a. p.Price <= t.High
b. p.Price >= t.Low
c. p.Price >= t.Low or p.Price <= t.High
d. p.Price >= t.Low and p.Price <= t.High

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!