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_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_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;
saleitems
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;
producttiers
Desired Results
|
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