Monday, April 10, 2006

SECTION 3 LESSON 3
1. Create a join based on the cost of the event between the DJs on Demand tables D_EVENTS and D_PACKAGES. Show the name of the event and the code for each event.

---- select de.name,dp.code
from d_events de, d_packages dp
where de.cost between dp.low_range and dp.high_range;

2. Using the Oracle database, create a query that returns the employee last name, salary, and job-grade level based on the salary. Select the salary between the lowest and highest salaries.

----select e.last_name,e.salary, jg.grade_level
from employees e, job_grades jg
where salary between lowest_sal and highest_sal

3. What condition requires creation of a nonequijoin?

---- Since there is no exact match between the two columns in each table.

4. Rewrite the following nonequijoin statement using the logical condition operators (AND, OR, NOT):
WHERE a.ranking BETWEEN g.lowest_rank AND g.highest_rank

----ranking >= g.lowest_rank and <= g.highest_rank

5. How do you know when to use a table alias and when not to use a table alias?

----the column is so long, and the column has to be used many times

6. What is the purpose of the WHERE clause in a join?

----provide the condition

7. What kind of join would you use if you wanted to find data between a range of numbers?

----nonequijoin

8. What kind of join would you use if you wanted to join two tables on any rows that have the same name and the same data type.

----equijoin

4 Comments:

Blogger Henry Ruan said...

Still on section 3? what about other 5 sections?

5:41 PM  
Blogger franklin said...

great post.This helped me a lot...

Hadoop training in coimbatore
Java training in coimbatore
Oracle training in coimbatore
Informatica training in coimbatore
Oracle training in coimbatore
Informatica training in coimbatore

8:11 AM  
Blogger anjani02 said...

I learned several useful points from this article. Keep up the great work!azure devops training

9:30 PM  
Blogger OnlineITGuru said...

MuleSoft training provides structured learning for professionals who want to develop skills in enterprise integration and API-led connectivity. This mulesoft training covers Anypoint Studio, Mule flows, API development, DataWeave, connectors, transformations, testing, and deployment. Learners strengthen their knowledge through industry-focused projects.

10:12 PM  

Post a Comment

<< Home