<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16568821</id><updated>2011-04-21T15:27:07.722-07:00</updated><title type='text'>太阳与月亮同存的星球</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16568821.post-114650326586949615</id><published>2006-05-01T10:05:00.000-07:00</published><updated>2006-05-02T10:40:42.390-07:00</updated><title type='text'>SECTION 8</title><content type='html'>lesson 2&lt;br /&gt;1.1 create o_employees&lt;br /&gt;as (select* from employees)&lt;br /&gt;1.2 create o_departments&lt;br /&gt;as (select * from departments)&lt;br /&gt;1.2 create o_jobs&lt;br /&gt;as (select * from jobs)&lt;br /&gt;&lt;br /&gt;2.insert into o_jobs(id,job_title,job_id,max_salary,min_salary)&lt;br /&gt;values(210,'Human Resources Mamager','HR_MAN',5500,4500)&lt;br /&gt;&lt;br /&gt;3.insert into o_employees&lt;br /&gt;(emoloyee_id,first_name,last_name,email_address,hire_date)&lt;br /&gt;values(210,'Ramon','Sanchez','RSANCHEZ',sysdate)&lt;br /&gt;&lt;br /&gt;4.insert into o_employees&lt;br /&gt;select (emoloyee_id,first_name,last_name,email_address,hire_date)&lt;br /&gt;values(210,'Ramon','Sanchez','RSANCHEZ',sysdate)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 4&lt;br /&gt;&lt;br /&gt;2.create table grad_candidates&lt;br /&gt;(student_id number(6),last_name varchar2(10), first_name varchar2(15),credits number (3), graduation_date date (8), constraint Graduate_Candidates_primary_key PRIMARY  KEY(student_id));&lt;br /&gt;&lt;br /&gt;3.despribe grad_candidates&lt;br /&gt;&lt;br /&gt;4.update smith_table&lt;br /&gt;as(select *&lt;br /&gt;from grad_candidates);&lt;br /&gt;&lt;br /&gt;5.select*&lt;br /&gt;from  USER_TABLES&lt;br /&gt;select *&lt;br /&gt; from USER_OBJECTS&lt;br /&gt;select *&lt;br /&gt;from USER_CATALOG or USER_CAT&lt;br /&gt;&lt;br /&gt;6.insert into smith_table&lt;br /&gt;values(..................................)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114650326586949615?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114650326586949615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114650326586949615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114650326586949615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114650326586949615'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/05/section-8.html' title='SECTION 8'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114565158277589786</id><published>2006-04-21T11:41:00.000-07:00</published><updated>2006-05-09T13:21:35.056-07:00</updated><title type='text'>SECTION 7</title><content type='html'>lesson 1&lt;br /&gt;&lt;br /&gt;1.select year&lt;br /&gt;from d_cds&lt;br /&gt;where title='Carpe Diem')&lt;br /&gt;&lt;br /&gt;2.select id,title,duration,artist&lt;br /&gt;from d_songs&lt;br /&gt;where type_code in (select code&lt;br /&gt;from d_types&lt;br /&gt;where description in('Jazz','Pop'))&lt;br /&gt;&lt;br /&gt;3.select cost&lt;br /&gt;from d_events&lt;br /&gt;where cost&lt;=(select cost&lt;br /&gt;from d_events&lt;br /&gt;where  package_code=200)&lt;br /&gt;&lt;br /&gt;4.select last_name,salary&lt;br /&gt;from employees&lt;br /&gt;where salary = any (select min(salary)&lt;br /&gt;from employees)&lt;br /&gt;&lt;br /&gt;5.select employee_id,last_name,salary&lt;br /&gt;from employees&lt;br /&gt;where salary=(select min(salary)&lt;br /&gt;from employees)&lt;br /&gt;&lt;br /&gt;6.a. Which CDs in our d_cds collection were produced before "Carpe Diem" was produced? &lt;br /&gt;WHERE year _&lt;_________ (SELECT year ...&lt;br /&gt;b. Which employees have salaries lower than any one of the programmers in the IT department?&lt;br /&gt;WHERE salary ___&lt; any______(SELECT salary ...&lt;br /&gt;c. What CD titles were produced in the same year as "Party Music for All Occasions" or "Carpe Diem"?&lt;br /&gt;WHERE year _____=____(SELECT year ...&lt;br /&gt;d. What song title has a duration longer than every type code 77 title?&lt;br /&gt;WHERE duration _____&gt;___(SELECT duration ...&lt;br /&gt;&lt;br /&gt;7._F a. WHERE size &gt; ANY If the inner query returns sizes ranging from 8 to 12, the value 9 could be returned in the outer query.&lt;br /&gt;__F__b. WHERE book_number IN If the inner query returns books numbered &lt;br /&gt;102, 105, 437, and 225 then 325 could be returned in the outer query.&lt;br /&gt;_F___c. WHERE score &lt;= ALL If the inner query returns the scores 89, 98, 65, and 72, then 82 could be returned in the outer query.&lt;br /&gt;__T__d. WHERE color NOT IN If the inner query returns red, green, blue, black, and then the outer query could return white.&lt;br /&gt;__ F_e. WHERE game_date = ANY If the inner query returns 05-JUN-97, 10-DEC-02, and 2-JAN-04, then the outer query could return 10- SEP-02.&lt;br /&gt;&lt;br /&gt;8.select min(salary)&lt;br /&gt;from employees&lt;br /&gt;where salary&lt;(select min(salary)&lt;br /&gt;from employees&lt;br /&gt;where department_id=50)&lt;br /&gt;&lt;br /&gt;9. Which statements are True about the subquery below?&lt;br /&gt;SELECT employee_id, last_name&lt;br /&gt;FROM   employees&lt;br /&gt;WHERE  salary =&lt;br /&gt;                (SELECT   MIN(salary)&lt;br /&gt;                 FROM     employees&lt;br /&gt;                 GROUP BY department_id);&lt;br /&gt;__F____a. The inner query could be eliminated simply by changing the WHERE clause to WHERE MIN(salary).&lt;br /&gt;_T_____b. The query wants the names of employees who make the same salary as the smallest salary in any department.&lt;br /&gt;_F_____c. The query firsts selects the employee ID and last name,  and then compares that to the salaries in every department.&lt;br /&gt;__T____d. This query will not execute.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.0. Place an X next to those values that could be returned by the outer query if the inner query returned 185.98, 315.75, 382.24, and 877.31 with the following WHERE clause:&lt;br /&gt;WHERE total_sales &lt; ANY&lt;br /&gt;___X__a. 155.22&lt;br /&gt;_____b. 325.88&lt;br /&gt;_____c. 877.30&lt;br /&gt;_____d. 382.24&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 2&lt;br /&gt;&lt;br /&gt;1.select last_name, job_id,salary&lt;br /&gt;from employees&lt;br /&gt;where department_id in (10,30)&lt;br /&gt;&lt;br /&gt;select last_name, job_id,salary&lt;br /&gt;from employees&lt;br /&gt;where department_id=10 or department_id=30&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.select department_name,location_id&lt;br /&gt;from departments&lt;br /&gt;order by department_id&lt;br /&gt;&lt;br /&gt;3.select first_name,last_name,job_id,location_id,to_char(salary,'$999,999.99')&lt;br /&gt;from employees,departments&lt;br /&gt;order by job_id,salary desc&lt;br /&gt;&lt;br /&gt;4.select first_name,last_name,job_id,salary&lt;br /&gt;from employees&lt;br /&gt;where salary in(select max(salary)&lt;br /&gt;from employees)&lt;br /&gt;&lt;br /&gt;5.&lt;br /&gt;&lt;br /&gt;lesson 4&lt;br /&gt;1.insert into copy_d_cds(cd_number,title,producer,year)&lt;br /&gt;values('97','celebrate the day','R&amp;B Inc.','2003')&lt;br /&gt;values('98','holiday tunes for all ages','Tunes Are Us','2004')&lt;br /&gt;values('99','party music','old town records','2004')&lt;br /&gt;values('100','best of rock and roll','old town records','2004)&lt;br /&gt;select *&lt;br /&gt;from copy_d_cds&lt;br /&gt;&lt;br /&gt;2.insert into copy_d_cds(id,title,duration,type code)&lt;br /&gt;values('52','surfing summer','not known','12')&lt;br /&gt;values('53','voctory victory','5 min','12)&lt;br /&gt;&lt;br /&gt;3.insert into copy_d_clients&lt;br /&gt;values(6655,'Ayako','Dahish',3608859030,'dahisha@harbor.net')&lt;br /&gt;values(6689,'Nick','Neuville',9048953049,'nnicky@charter.net')&lt;br /&gt;&lt;br /&gt;4.insert into copy_d_clients(id,name,event_date,&lt;br /&gt;description,cost,venue_id,&lt;br /&gt;package_code,theme_code,client_number)&lt;br /&gt;values('110','Ayako Anniversary','07-jul-04',&lt;br /&gt;'party for 50,sixties dress,cecorations',null,&lt;br /&gt;'245','79','240','6655')&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 5&lt;br /&gt;&lt;br /&gt;1.update copy_f_food_items&lt;br /&gt;set price='3.75'&lt;br /&gt;where food_item='strawberry shake'&lt;br /&gt;and set price='1.20'&lt;br /&gt;where food_item='fries'&lt;br /&gt;&lt;br /&gt;2.update copy_f_staffs&lt;br /&gt;set overtime_pay=overtime_pay+0.75&lt;br /&gt;where last_name='Miller' and first_name='Bob'&lt;br /&gt;set overtime_pay=nul(overtime_pay+0.85,0)&lt;br /&gt;where last_name='Doe'and first_name='Sue'&lt;br /&gt;&lt;br /&gt;5.update copy_f_staffs&lt;br /&gt;set salary=(select salary&lt;br /&gt;from copy_f_staffs&lt;br /&gt;where last_name='Miler'and first_name='Bob')&lt;br /&gt;WHERE LAST_NAME='Doe' and first_name='Sue'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114565158277589786?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114565158277589786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114565158277589786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114565158277589786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114565158277589786'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/04/section-7.html' title='SECTION 7'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114559568137275949</id><published>2006-04-20T21:35:00.000-07:00</published><updated>2006-04-21T11:41:11.340-07:00</updated><title type='text'>SECTION 6</title><content type='html'>lesson 1&lt;br /&gt;&lt;br /&gt;1. a.T          b. F      c. T          d.T      e.F&lt;br /&gt;&lt;br /&gt;2.a.SELECT manager_id,avg(salary)&lt;br /&gt;   from employees&lt;br /&gt;    having avg(salary)&lt;16000&lt;br /&gt;    group by manager_id&lt;br /&gt;&lt;br /&gt;   b. SELECT cd_number, COUNT(title)&lt;br /&gt;    FROM d_cds&lt;br /&gt;    WHERE cd_number &lt; 93&lt;br /&gt;    group by cd_number&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   c.SELECT ID, MAX(ID), artist AS "Artist"&lt;br /&gt;    FROM d_songs&lt;br /&gt;    WHERE duration IN('3 min', '6 min', '10 min')&lt;br /&gt;    HAVING ID &lt; 50&lt;br /&gt;    GROUP by ID;&lt;br /&gt;&lt;br /&gt;   d.SELECT loc_type, rental_fee AS "Fee"&lt;br /&gt;    FROM d_venues&lt;br /&gt;    WHERE id &lt;100&lt;br /&gt;     ORDER BY 2;&lt;br /&gt;&lt;br /&gt;3.SELECT MAX(DISTINCT(song_id)) &lt;br /&gt;FROM d_track_listings&lt;br /&gt;where track IN ( 1, 2, 3);&lt;br /&gt;&lt;br /&gt;4.?&lt;br /&gt;&lt;br /&gt;5.a.F    b.F      c.F&lt;br /&gt;&lt;br /&gt;lesson 2&lt;br /&gt;F_____1. The CONCAT character function combines two or more character values into one character string.&lt;br /&gt;&lt;br /&gt;T_____2. The SYSDATE function returns the Oracle Server date and time.&lt;br /&gt;&lt;br /&gt;T_____3. The RPAD character function returns a right-justified value with a string of characters replicated to fill a specified number of character positions.&lt;br /&gt;&lt;br /&gt;T_____4. The ROUND number function will round 469.89 to 470 if the decimal place value is omitted.&lt;br /&gt;&lt;br /&gt;F_____5. The SUBSTR character function returns a portion of a string beginning at the start of a string to a specified number of characters.&lt;br /&gt;&lt;br /&gt;T_____6. DESC will order alphabetical data from Z to A.&lt;br /&gt;&lt;br /&gt;T_____7. The column name in a SELECT statement is an example of a SELECTION.&lt;br /&gt;&lt;br /&gt;F_____8. You cannot use a column alias in the WHERE clause.&lt;br /&gt;&lt;br /&gt;F_____9. To specify an alias in the SELECT clause for retired employee, use 'Retired Employee.'&lt;br /&gt;&lt;br /&gt;T_____10. Aliases always appear in UPPERCASE, unless enclosed within proper quote marks.&lt;br /&gt;&lt;br /&gt;F_____11. If any column value in an arithmetic expression is NULL, the result defaults to 0.&lt;br /&gt;&lt;br /&gt;T_____12. Null values are treated as zero when using SUM functions.&lt;br /&gt;&lt;br /&gt;F_____13. In arithmetic expressions, multiply and divide are evaluated after addition and substraction. &lt;br /&gt;&lt;br /&gt;T_____14. By default, column headings are returned in UPPERCASE.&lt;br /&gt;&lt;br /&gt;T_____15. SQL statements are not case-sensitive, unless indicated.&lt;br /&gt;&lt;br /&gt;T_____16. SQL statements can be entered on one or more lines.&lt;br /&gt;&lt;br /&gt;T_____17. SQL keywords can be abbreviated using single quotes.&lt;br /&gt;&lt;br /&gt;T_____18. Columns are displayed in the order in which they appear in the WHERE clause.&lt;br /&gt;&lt;br /&gt;T_____19. Column aliases that are more than one word require the AS prefix.&lt;br /&gt;&lt;br /&gt;T_____20. In the SELECT clause, if an expression is not a column name or a column alias, it is a literal value.&lt;br /&gt;&lt;br /&gt;T_____21. Number and date values must be enclosed in single quotes.&lt;br /&gt;&lt;br /&gt;T_____22. The keyword DISTINCT will affect all of the columns in the statement: SELECT DISTINCT(employee_id, department_id,department_name)&lt;br /&gt;&lt;br /&gt;T_____23. HTML DB is a type of application.&lt;br /&gt;&lt;br /&gt;T_____24. VARCHAR2 describes variable-length character values.&lt;br /&gt;&lt;br /&gt;F_____25. To restrict the rows returned from a query, use the SELECT clause.&lt;br /&gt;&lt;br /&gt;F_____26. The comparison operator IN is used to match any of a list of items.&lt;br /&gt;&lt;br /&gt;F_____27. Using WHERE employee_id = NULL returns all employees where do not have an employee ID.&lt;br /&gt;&lt;br /&gt;F_____28. BETWEEN 250 AND 350 will return 101 values.&lt;br /&gt;&lt;br /&gt;T_____29. LIKE '_ _ e%' could return 'Fred.'&lt;br /&gt;&lt;br /&gt;T_____30. To return SA_MAN, use LIKE ' SA /_%' ESCAPE ' \ '&lt;br /&gt;&lt;br /&gt;T_____31. Logical operators are evaluated in the AND, OR, NOT order.&lt;br /&gt;&lt;br /&gt;T_____32. WHERE e.last_name LIKE 'Sm%' OR d.department_id = 60 AND d.department_name = 'IT' could return anyone from the IT department whose department ID is 60.&lt;br /&gt;&lt;br /&gt;T_____33. The rules of precedence would evaluate an expression that contained each of the following in the order: arithmetic, concatenation, NOT, OR&lt;br /&gt;&lt;br /&gt;T_____34. The ORDER BY clause comes last in the SELECT statement.&lt;br /&gt;&lt;br /&gt;T_____35. In SELECT last_name, first_name, the ORDER BY clause could include department_id.&lt;br /&gt;&lt;br /&gt;T_____36. The order of execution of a SELECT statement is: FROM, WHERE, SELECT, ORDER BY&lt;br /&gt;&lt;br /&gt;F_____37. ADD_MONTHS(hire_date, 6) will return a number.&lt;br /&gt;&lt;br /&gt;F_____38. MONTHS BETWEEN ('05-DEC-89' , '10-JUN-93') will return 4.&lt;br /&gt;&lt;br /&gt;T_____39. If April 21st is a MONDAY, then NEXT_DAY('21-APR'-03', 'FRIDAY') will return 25-APR-03.&lt;br /&gt;&lt;br /&gt;T_____40. ROUND(SYSDATE, 'YEAR') will return 01-JAN-05 if today is August 23, 2004.&lt;br /&gt;&lt;br /&gt;F_____41. All group functions ignore NULL values.&lt;br /&gt;&lt;br /&gt;F_____42. SELECT COUNT( last_name, first_name) will return the number of last and first names in the database.&lt;br /&gt;&lt;br /&gt;F_____43. If salary values in a column are 5000, null, 4000, 7000, using AVG(salary) will return 4000.&lt;br /&gt;&lt;br /&gt;T_____44. AVG(DISTINCT salary) will average only the salaries that are different from each other.&lt;br /&gt;&lt;br /&gt;F_____45. NULLIF(salary, 4000) will return 4000 if the employee's salary is 5000.&lt;br /&gt;&lt;br /&gt;T____ 46. COALESCE(hire_date, salary, commission_pct) will return salary if the hire date is NULL.&lt;br /&gt;&lt;br /&gt;T____ 47. The HAVING clause is used to restrict groups.&lt;br /&gt;&lt;br /&gt;T____48. If a GROUP BY clause is used, any column that is in the SELECT clause that is not a group function must be listed in the GROUP BY clause.&lt;br /&gt;&lt;br /&gt;F_____49. If a query lists clauses WHERE, GROUP BY, and HAVING, no ORDER BY clause can be used.&lt;br /&gt;&lt;br /&gt;T_____50. If a join is needed and you want to use a WHERE clause, choose a JOIN ON or JOIN USING join.&lt;br /&gt;&lt;br /&gt;T_____51. COUNT(DISTINCT department_id) will return the number of different department IDs.&lt;br /&gt;&lt;br /&gt;F_____52. If a column had 4 NULL employee IDs and 250 defined IDs, COUNT will return 254.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 5&lt;br /&gt;&lt;br /&gt;1.select title, artist&lt;br /&gt;from d_songs&lt;br /&gt;where type_code=(select type_code&lt;br /&gt;from d_songs&lt;br /&gt;where title='Im Going to Miss My Teacher')&lt;br /&gt;&lt;br /&gt;2.select employee_id,last_name,salary&lt;br /&gt;from employees&lt;br /&gt;where salary&lt;(select max(salary)&lt;br /&gt;from employees&lt;br /&gt;where job_id='ST_CLERK')&lt;br /&gt;&lt;br /&gt;3.select event_id,song_id&lt;br /&gt;from d_play_list_items&lt;br /&gt;where event_id=(select event_id&lt;br /&gt;from d_play_list_items&lt;br /&gt;where song_id=45)&lt;br /&gt;&lt;br /&gt;4.select id, name&lt;br /&gt;from d_events&lt;br /&gt;where cost&gt;(select cost&lt;br /&gt;from d_events&lt;br /&gt;where id=100)&lt;br /&gt;&lt;br /&gt;5.select cd_number,title&lt;br /&gt;from d_cds&lt;br /&gt;where cd_number=(select cd_number&lt;br /&gt;from d_cds&lt;br /&gt;where title='Party Music for All Occasions')&lt;br /&gt;&lt;br /&gt;6.select code,description&lt;br /&gt;from d_themes&lt;br /&gt;where code=(select code&lt;br /&gt;from d_themes&lt;br /&gt;where description='Tropical')&lt;br /&gt;&lt;br /&gt;7.select id,last_name,salary&lt;br /&gt;from f_staffs&lt;br /&gt;where salary&gt;(select salary&lt;br /&gt;from f_staffs&lt;br /&gt;where id=12)&lt;br /&gt;&lt;br /&gt;8.select id,last_name,staff_type&lt;br /&gt;from f_staffs&lt;br /&gt;where staff_type&lt;&gt;(select staff_type&lt;br /&gt;from f_staffs&lt;br /&gt;where first_name='Bob' and last_name='Miller')&lt;br /&gt;&lt;br /&gt;9.select id,last_name,staff_type,salary&lt;br /&gt;from f_staffs&lt;br /&gt;where salary&lt;(select salary&lt;br /&gt;from f_staffs&lt;br /&gt;where staff_type='Cook')&lt;br /&gt;&lt;br /&gt;10.select id,theme_code&lt;br /&gt;from d_events&lt;br /&gt;where theme_code=(select theme_code&lt;br /&gt;from d_events&lt;br /&gt;where id=100)&lt;br /&gt;&lt;br /&gt;11.select department_id,department_name&lt;br /&gt;from departments&lt;br /&gt;where department_id=(select department_id&lt;br /&gt;from departments&lt;br /&gt;where department_name='IT')&lt;br /&gt;&lt;br /&gt;12.select department_id,department_name&lt;br /&gt;from departments&lt;br /&gt;where location_id=(select location_id&lt;br /&gt;from locations&lt;br /&gt;where city='Seattle')&lt;br /&gt;&lt;br /&gt;13.select department_id,min(salary)&lt;br /&gt;from employees&lt;br /&gt;group by department_id&lt;br /&gt;having min(salary)&gt;(select min(salary)&lt;br /&gt;from employees&lt;br /&gt;where department_id&lt;&gt;50)&lt;br /&gt;&lt;br /&gt;14.B&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114559568137275949?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114559568137275949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114559568137275949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114559568137275949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114559568137275949'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/04/section-6.html' title='SECTION 6'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114559410086176530</id><published>2006-04-20T20:30:00.000-07:00</published><updated>2006-04-20T21:35:01.190-07:00</updated><title type='text'>SECTION 5</title><content type='html'>lesson 1.&lt;br /&gt;1.null&lt;br /&gt;2.depend on which side is null or the question need&lt;br /&gt;3.condition&lt;br /&gt;4.values,data type&lt;br /&gt;5.colunm name, data type&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 4&lt;br /&gt;&lt;br /&gt;1.select round(avg(cost),2)&lt;br /&gt;  from d_events&lt;br /&gt;2.select avg(salary)&lt;br /&gt;from f_staffs&lt;br /&gt;where manager_id=19&lt;br /&gt;&lt;br /&gt;3.select sum(salary)&lt;br /&gt;from f_staffs&lt;br /&gt;where id in (12,9)&lt;br /&gt;&lt;br /&gt;4.select min(salary),max(hire_date),min(last_name),max(last_name)&lt;br /&gt; from employees&lt;br /&gt;where department_id in (50,60)&lt;br /&gt;&lt;br /&gt;5.only one&lt;br /&gt;&lt;br /&gt;6.??&lt;br /&gt;7.march 30,1969&lt;br /&gt;&lt;br /&gt;8.select avg(order_total)&lt;br /&gt;from f_orders&lt;br /&gt;order by order_date&lt;br /&gt;&lt;br /&gt;9.select max(hire_date)&lt;br /&gt;from employees&lt;br /&gt;&lt;br /&gt;(MAX(HIRE_DATE) &lt;br /&gt;29-1月 -00 )&lt;br /&gt;&lt;br /&gt;10.sum&lt;br /&gt;&lt;br /&gt;lesson 5&lt;br /&gt;&lt;br /&gt;1.select count(title)&lt;br /&gt;  from d_songs&lt;br /&gt;  (6)&lt;br /&gt;2.select count(distinct(loc_type))&lt;br /&gt;from d_venues&lt;br /&gt;(4)&lt;br /&gt;&lt;br /&gt;3.select count(song_id),count(distinct(cd_number))&lt;br /&gt;from d_track_listings&lt;br /&gt;&lt;br /&gt;COUNT(SONG_ID) COUNT(DISTINCT(CD_NUMBER)) &lt;br /&gt;5                 4 &lt;br /&gt;&lt;br /&gt;4.select count(email)&lt;br /&gt;from d_clients&lt;br /&gt;(3)&lt;br /&gt;&lt;br /&gt;5.select count(auth_expense_amt)&lt;br /&gt;from d_partners&lt;br /&gt;(1)&lt;br /&gt;&lt;br /&gt;6.(4)&lt;br /&gt;&lt;br /&gt;7.select avg(auth_expense_amt)&lt;br /&gt;from d_partners&lt;br /&gt;&lt;br /&gt;8.a. from    b.sum      c.sum       d.avg       e.min         f.max   g.min&lt;br /&gt;&lt;br /&gt;9. a.T        b. T        c. T         d.F&lt;br /&gt;&lt;br /&gt;10.a. T         b.F          c. F          d.T&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114559410086176530?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114559410086176530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114559410086176530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114559410086176530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114559410086176530'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/04/section-5.html' title='SECTION 5'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114558995454094064</id><published>2006-04-20T20:25:00.000-07:00</published><updated>2006-05-09T13:12:09.936-07:00</updated><title type='text'>SECTOION 4</title><content type='html'>Lesson5&lt;br /&gt;&lt;br /&gt;1. A/An _Natural join__ is when the rows of the tables &lt;br /&gt;are combined with each other and produce new rows . &lt;br /&gt;The number of rows is equivalent to the product of the&lt;br /&gt; number of rows in each table.&lt;br /&gt; &lt;br /&gt;2. A/An ___self join___ is used when you need to query&lt;br /&gt; a table that has a relationship to itself.&lt;br /&gt;&lt;br /&gt;3. A/An _cross join_____ preserves unmatched rows from &lt;br /&gt;one or both tables, returning the rows that are matched&lt;br /&gt; and unmatched from one or both tables.&lt;br /&gt;&lt;br /&gt;4. In an outer join, a plus sign (+) is placed on the&lt;br /&gt; side of the join that is _____null___information.&lt;br /&gt;&lt;br /&gt;5. A ____nonequijoin_____is used when a column in one &lt;br /&gt;table does not correspond directly to a column in another table.&lt;br /&gt;&lt;br /&gt;6. The join condition is always placed in the __using___clause &lt;br /&gt;of the SELECT statement.&lt;br /&gt;&lt;br /&gt;7. A/An    shortcut of the colunm name____ is used to preface&lt;br /&gt; the column name in order to clarify which table and column&lt;br /&gt; are participating in the join.&lt;br /&gt;&lt;br /&gt;8. Table aliases are created in the   as__clause of &lt;br /&gt;the SELECT statement.&lt;br /&gt;&lt;br /&gt;9. In a full outer join, a row that does not contain&lt;br /&gt; data will/will not appear in the results set if the&lt;br /&gt; row satisfies the join condition.&lt;br /&gt;&lt;br /&gt;10. Table aliases cannot exceed ___more______ characters&lt;br /&gt; in length.&lt;br /&gt;&lt;br /&gt;11. Identify the Oracle syntax to signify an outer join___________.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. If a join condition is written: &lt;br /&gt;WHERE e.client_number = c.client_number, &lt;br /&gt;what kind of join would it be if we wanted &lt;br /&gt;all the information in the e table even if &lt;br /&gt;the c table has missing data? _ritght outer join_____&lt;br /&gt;&lt;br /&gt;13. Joins that are based on hierarchical relationships &lt;br /&gt;such as manager and employee are called __________.&lt;br /&gt;&lt;br /&gt;14. How many join conditions does it take to join three tables? _4__&lt;br /&gt;&lt;br /&gt;15.?&lt;br /&gt;16.nonequijion&lt;br /&gt;17.natural join and equijoin&lt;br /&gt;18.Cartesian product &lt;br /&gt;20. T___ cross-join&lt;br /&gt;    T___ equijoin&lt;br /&gt;    T___ natural join&lt;br /&gt;21.nonequijoin &lt;br /&gt;  USING clause&lt;br /&gt;22.Nonequijoin&lt;br /&gt;23.????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lesson 4&lt;br /&gt;&lt;br /&gt;1.select j.job_id,j.job_title,e.first_name,e.last_name,e.department_id&lt;br /&gt;from jobs j full outer join employees e&lt;br /&gt;on(j.job_id=e.job_id)&lt;br /&gt;where j.job_id='IT_PROG'&lt;br /&gt;&lt;br /&gt;2.select e.last_name "Employee",e.employee_id "Emp#",&lt;br /&gt;e.last_name "Manager",e.manager_id "Mgr#"&lt;br /&gt;from employees e full outer join employees m&lt;br /&gt;on (e.employee_id=m.manager_id)&lt;br /&gt;&lt;br /&gt;3.select e.last_name "Employee",e.employee_id "Emp#",&lt;br /&gt;e.last_name "Manager",e.manager_id "Mgr#"&lt;br /&gt;from employees e full outer join employees m&lt;br /&gt;on (e.employee_id=m.manager_id(+))&lt;br /&gt;&lt;br /&gt;4.select c.first_name,c.last_name,e.event_date,&lt;br /&gt;e.description&lt;br /&gt;from d_clients c full outer join d_events e&lt;br /&gt;on (c.client_number=e.client_number(+))&lt;br /&gt;&lt;br /&gt;5.select f.description, s.shift_assgn_date &lt;br /&gt;from f_shifts f full outer join f_shift_assignments s&lt;br /&gt;on(f.code=s.code)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lesson 3&lt;br /&gt;&lt;br /&gt;1.select l.location_id,d.department_name&lt;br /&gt;from locations l join departments d&lt;br /&gt;on (l.location_id=d.location_id)&lt;br /&gt;where l.location_id=1400&lt;br /&gt;&lt;br /&gt;2.??????????&lt;br /&gt;&lt;br /&gt;3.select d.department_name,d.department_id,&lt;br /&gt;l.location_id,l.city&lt;br /&gt;from locations l join departments d&lt;br /&gt;on(l.location_id=d.location_id)&lt;br /&gt;where d.department_id in(10,20,30)&lt;br /&gt;&lt;br /&gt;4.select region_id,country_name,region_name&lt;br /&gt;from regions join countries&lt;br /&gt;using (region_id)&lt;br /&gt;&lt;br /&gt;5.select first_name,last_name,hire_date,job_id,job_title,max_salary&lt;br /&gt;from employees join jobs&lt;br /&gt;using (job_id)&lt;br /&gt;where salary&gt;=12000&lt;br /&gt;&lt;br /&gt;6.select job_title,first_name,last_name,email&lt;br /&gt;from employees join jobs  &lt;br /&gt;using (job_id)&lt;br /&gt;where job_id ='ST_CLERK'&lt;br /&gt;&lt;br /&gt;7.select e.employee_id,e.first_name,&lt;br /&gt;e.last_name,m.manager_id,m.first_name,m.last_name&lt;br /&gt;from employees e join employees m&lt;br /&gt;on (e.employee_id=m.manager_id)&lt;br /&gt;&lt;br /&gt;8.select l.location_id,l.city,d.department_name&lt;br /&gt;from locations l join departments d&lt;br /&gt;on (l.location_id=d.location_id)&lt;br /&gt;&lt;br /&gt;9.select e.manager_id,d.department_id,&lt;br /&gt;d.department_name,e.first_name,e.last_name&lt;br /&gt;from employees e join departments d&lt;br /&gt;on (e.department_id=d.department_id)&lt;br /&gt;where e.department_id in(80,90,110,190)&lt;br /&gt;&lt;br /&gt;10.select e.employee_id,e.last_name,&lt;br /&gt;d.department_id,d.department_name,e.hire_date&lt;br /&gt;from employees e join departments d&lt;br /&gt;on (e.department_id=d.department_id)&lt;br /&gt;where e.hire_date='07-6月 -94'&lt;br /&gt;&lt;br /&gt;lesson 2&lt;br /&gt;&lt;br /&gt;1.select last_name,department_name&lt;br /&gt;from employees cross join departments&lt;br /&gt;&lt;br /&gt;2.select department_id,department_name,location_id,city&lt;br /&gt;from departments natural join locations&lt;br /&gt;&lt;br /&gt;3.select d.department_id,d.department_name,l.location_id,l.city&lt;br /&gt;from departments d,locations l&lt;br /&gt;where d.location_id=l.location_id&lt;br /&gt;&lt;br /&gt;4.select department_id,department_name,location_id,city&lt;br /&gt;from departments natural join locations &lt;br /&gt;where department_id in (20,50)&lt;br /&gt;&lt;br /&gt;5.select d_songs.title,d_types.code,d_types.description&lt;br /&gt;from d_songs,d_types&lt;br /&gt;where d_types.code between 70 and 80&lt;br /&gt;&lt;br /&gt;6. a. where         b.from&lt;br /&gt;&lt;br /&gt;7.  a.aliase        8.join clause&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114558995454094064?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114558995454094064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114558995454094064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114558995454094064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114558995454094064'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/04/sectoion-4.html' title='SECTOION 4'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114558882956579067</id><published>2006-04-20T20:06:00.000-07:00</published><updated>2006-04-20T20:11:48.466-07:00</updated><title type='text'>SECTOION 3</title><content type='html'>lesson 5&lt;br /&gt;&lt;br /&gt;1.select e.last_name "Employee",e.employee_id "Emp#",m.last_name "Manager",m.manager_id "Mgr#"&lt;br /&gt;from employees e,employees m&lt;br /&gt;&lt;br /&gt;2.select e.last_name "Employee",e.employee_id "Emp#",m.last_name "Manager",m.manager_id "Mgr#"&lt;br /&gt;from employees e,employees m&lt;br /&gt;where e.employee_id(+)=m.manager_id&lt;br /&gt;&lt;br /&gt;3.select e.last_name "Employee",e.hire_date "Emp Hired",m.last_name "Manager", m.hire_date "Mgr Hired"&lt;br /&gt;from employees e,employees m&lt;br /&gt;where e.hire_date&lt;=m.hire_date&lt;br /&gt;&lt;br /&gt;4.select e.last_name,e.department_id,d.department_name&lt;br /&gt;from employees e,departments d&lt;br /&gt;where e.department_id=d.department_id&lt;br /&gt;&lt;br /&gt;5.select l.location_id,l.city,d.department_name&lt;br /&gt;from locations l,departments d&lt;br /&gt;where l.location_id=d.location_id&lt;br /&gt;&lt;br /&gt;6.select e.last_name,d.department_name&lt;br /&gt;from employees e, departments d&lt;br /&gt;where e.first_name='Diana' and e.last_name='Lorentz'&lt;br /&gt;&lt;br /&gt;7.when the side does not have the information that matching with the other side, you need to add (+).&lt;br /&gt;&lt;br /&gt;Lesson 4&lt;br /&gt;&lt;br /&gt;1.Select f_customers.*, f_orders.* &lt;br /&gt;from f_customers, f_orders &lt;br /&gt;where f_customers.id= f_orders.cust_id(+)&lt;br /&gt;&lt;br /&gt;2.Select employees.last_name, departments.department_id, departments.department_name from employees, departments where employees.department_id= departments.department_id(+);&lt;br /&gt;&lt;br /&gt;3.Select employees.last_name, departments.department_id, departments.department_name from employees, departments where employees.department_id(+)= departments.department_id&lt;br /&gt;&lt;br /&gt;4.a. where e.department_id(+)=d.department_id   OR  where &lt;br /&gt;      e.department_id=d.department_id(+)&lt;br /&gt;  b.select e.first_name,e.last_name,d.department_name,d.department_id&lt;br /&gt;     from employees e, departmetns d&lt;br /&gt;      where e.department_id=d.department_id;&lt;br /&gt;  c.where e.position&gt;=p.highest  and where p.highest&lt;=p.lowest;&lt;br /&gt;  d.select e.employee_id,e.last_name,d.location_id&lt;br /&gt;    from employees e, departments d&lt;br /&gt;     where e.department_id=e.department_id;&lt;br /&gt;5.select d_cds.title,d_songs.id&lt;br /&gt;from d_cds,d_songs&lt;br /&gt;where d_cds.cd_number(+)=d_songs.type_code&lt;br /&gt;&lt;br /&gt;lesson 3&lt;br /&gt;&lt;br /&gt;1.select d_events.name,d_packages.code&lt;br /&gt;  from d_events,d_packages&lt;br /&gt;2.Select employees.last_name, employees.salary, job_grades.grade_level from employees, job_grades where employees.salary between job_grades.lowest_sal and highest_sal&lt;br /&gt;3.between.....and ...&lt;br /&gt;4.ranking &gt;= g.lowest_rank and &lt;= g.highest_rank&lt;br /&gt;5.denpent on what kind of join you are going to use&lt;br /&gt;6.limite the searching&lt;br /&gt;7.equijoins&lt;br /&gt;8.nonequijoins&lt;br /&gt;&lt;br /&gt;Lesson 2&lt;br /&gt;&lt;br /&gt;1.select *&lt;br /&gt;  from d_play_list_items,d_track_listings&lt;br /&gt;2.select   d_play_list_items.event_id,d_play_list_items.song_id,&lt;br /&gt;  d_play_list_items.comments,d_track_listings.cd_number,&lt;br /&gt;d_track_listings.track&lt;br /&gt;from d_play_list_items,d_track_listings&lt;br /&gt;where d_play_list_items.song_id=d_track_listings.song_id&lt;br /&gt;3.select d_songs.title, d_songs.artist, d_types.description &lt;br /&gt;from d_songs,d_types&lt;br /&gt;4.select d_songs.title, d_songs.artist, d_types.description &lt;br /&gt;from d_songs,d_types&lt;br /&gt;where d_songs.id in(47,48)&lt;br /&gt;5.select *&lt;br /&gt;from d_clients,d_events,d_job_assignments&lt;br /&gt;6.select d_track_listings.song_id,d_cds.title &lt;br /&gt;from d_track_listings,d_cds&lt;br /&gt;7. a.F   b.T   c.T   d.F   e.T   f.F   g.T&lt;br /&gt;&lt;br /&gt;Lesson 1&lt;br /&gt;plan for my future&lt;br /&gt;  i do not know what will happen in my future,so the first thing is do the thing i want to do.i will go to college first and then during my collgeg time i will look for job that connect with my major.&lt;br /&gt;  i think when i am still studying in college, i will live with my parent because i want to save money and may be my college is not far away from my house. the major i will choose is manager. the first thing i need to do is finished my four-years college and then think about next because there are a lot of changing in the future and i dont know what will happen.&lt;br /&gt;  my ten-years goal: in the first year, i will studying in college and go on look for my interst and stuggle for my english. in the second year, i will study and work together. in the fourth year, i think my major is decided, so i will stuggle in my major and start to look for a better job. after my four-years college, maybe i will work first and then go to the higher education.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114558882956579067?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114558882956579067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114558882956579067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114558882956579067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114558882956579067'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/04/sectoion-3.html' title='SECTOION 3'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114282923153980497</id><published>2006-03-19T20:20:00.000-08:00</published><updated>2006-03-19T20:33:51.553-08:00</updated><title type='text'>LESSON 5</title><content type='html'>2.1.Select cd_number||title &lt;br /&gt;    from d_cds &lt;br /&gt;    where cd_number =94;&lt;br /&gt;  2.Select concat(cd_number,title) &lt;br /&gt;     from d_cds &lt;br /&gt;     where cd_number =94;&lt;br /&gt;3.a.F b.F c.F d.T e.F f.T g.T&lt;br /&gt;&lt;br /&gt;4.Select to_char(cost, '$999999.99') from d_events;&lt;br /&gt;&lt;br /&gt;5.Select lpad(id,2,'*') from f_staffs where id&lt;10&lt;br /&gt;&lt;br /&gt;6.Select '15-DEC-95' from dual&lt;br /&gt;&lt;br /&gt;7.Select to_char('19-Jun-04','ddth "of" fmmonth year' from dual&lt;br /&gt;&lt;br /&gt;8.Select substr('Oracle Academy',14,14) from dual&lt;br /&gt;&lt;br /&gt;9.SELECT loc_type&lt;br /&gt;FROM d_venues&lt;br /&gt;WHERE loc_type LIKE 'National Park'&lt;br /&gt;AND ID = 200;&lt;br /&gt; CHANGE TO&lt;br /&gt;&lt;br /&gt;SELECT loc_type&lt;br /&gt;FROM d_venues&lt;br /&gt;WHERE loc_type LIKE 'National Park'&lt;br /&gt;OR ID = 200;&lt;br /&gt;&lt;br /&gt;10.a.N b.N  C.D d.N e.G  f.CE  g.G h.C  i.D j.C k.C l.D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114282923153980497?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114282923153980497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114282923153980497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114282923153980497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114282923153980497'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/03/lesson-5.html' title='LESSON 5'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114236587801758183</id><published>2006-03-14T11:24:00.000-08:00</published><updated>2006-03-19T19:55:41.353-08:00</updated><title type='text'>lesson4</title><content type='html'>1.select first_name,last_name,zip&lt;br /&gt;from F_CUSTOMERS&lt;br /&gt;where length(zip)&lt;10&lt;br /&gt;&lt;br /&gt;2.&lt;br /&gt;&lt;br /&gt;3.select id,first_name,last_name,nvl2(auth_expense_amt,'auth_expense_amt','Not Approved')from d_partners&lt;br /&gt;&lt;br /&gt;4.i think it cant use nvl,so i change it to nvl2&lt;br /&gt;SELECT first_name,last_name,NVL2(overtime_rate,'no overtime','overtime_rate') As "Payrate"&lt;br /&gt;FROM f_staffs&lt;br /&gt;&lt;br /&gt;5.select first_name,last_name,birthdate,to_char(birthdate,'Month,RRRR')as "SEND CARD"&lt;br /&gt;from f_staffs&lt;br /&gt;&lt;br /&gt;6.a.F         b.F          c.T           d.T          e.F     f.F      g.T&lt;br /&gt;&lt;br /&gt;7.select first_name,last_name,NVL2('HIRE_DATE','ONE WEEK VACATION')AS "WORK YEAR"&lt;br /&gt;FROM EMPLOYEES&lt;br /&gt;WHERE MONTHS_BETWEEN(SYSDATE,HIRE_DATE)&gt;120&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114236587801758183?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114236587801758183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114236587801758183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114236587801758183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114236587801758183'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/03/lesson4.html' title='lesson4'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114227312826179759</id><published>2006-03-13T09:48:00.000-08:00</published><updated>2006-03-14T10:12:24.810-08:00</updated><title type='text'>lesson2</title><content type='html'>1.select name,start_date,end_date,nvl('end in two weeks','end_date')&lt;br /&gt;from f_promotional_menus&lt;br /&gt;&lt;br /&gt;2.select last_name,NVL(overtime_rate,0) as&lt;br /&gt;"Overtime Status" from f_staffs&lt;br /&gt;&lt;br /&gt;3.select last_name,overtime_rate,nvl2(overtime_rate,overtime_rate,5)from f_staffs&lt;br /&gt;&lt;br /&gt;4.select last_name&lt;br /&gt;from f_staffs&lt;br /&gt;where manager_id=19&lt;br /&gt;&lt;br /&gt;5."d"&lt;br /&gt;&lt;br /&gt;6.NAME &lt;br /&gt;  Doe &lt;br /&gt;  Miller &lt;br /&gt;  Tuttle&lt;br /&gt;&lt;br /&gt;7.part1. select first_name,last_name,to_char(hire_date)&lt;br /&gt;         from employees &lt;br /&gt;  part2.select first_name,last_name,nullif(to_char(hire_date),to_char(hire_date))&lt;br /&gt;from employees&lt;br /&gt;where hire_date='21-sep-89';&lt;br /&gt;&lt;br /&gt;8.select first_name,specialty,nvl(specialty,'No Specialty')from d_partners&lt;br /&gt;&lt;br /&gt;9.select last_name,substr(phone,3,6)from d_clients&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114227312826179759?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114227312826179759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114227312826179759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114227312826179759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114227312826179759'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/03/lesson2.html' title='lesson2'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114175483553928774</id><published>2006-03-07T10:06:00.000-08:00</published><updated>2006-03-14T12:06:10.953-08:00</updated><title type='text'>lesson3</title><content type='html'>1.select name,round(months_between(sysdate,end_date))as"Past Promos" from F_PROMOTIONAL_MENUS&lt;br /&gt;&lt;br /&gt;2.select first_name||' '||last_name||' '||concat('earns','$10000.00')||' '||concat('monthly','but')||' '||concat('wants','$14000.00')&lt;br /&gt;from employees&lt;br /&gt;where employee_id=174&lt;br /&gt;&lt;br /&gt;3.select id,title,duration,decode(duration,'2 min','shortest','10 min','longest',duration)as "Play Times"&lt;br /&gt;from d_songs&lt;br /&gt;&lt;br /&gt;4.select department_id,last_name,salary,decode(department_id,50,1.25*salary,80,1.5*salary,1.75*salary)as "New Salary"&lt;br /&gt;from employees&lt;br /&gt;&lt;br /&gt;5.select first_name,last_name,manager_id,commission_pct&lt;br /&gt;from employees&lt;br /&gt;where department_id in(80, 90);&lt;br /&gt;&lt;br /&gt;select manager_id,coalesce(manager_id,commission_pct,9999)as "Review"&lt;br /&gt;from employees&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114175483553928774?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114175483553928774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114175483553928774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114175483553928774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114175483553928774'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/03/lesson3.html' title='lesson3'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114170527996582530</id><published>2006-03-06T19:31:00.000-08:00</published><updated>2006-03-07T10:16:38.560-08:00</updated><title type='text'>section2    lesson1</title><content type='html'>1.select last_name,to_char(birthdate,'fxmonth DD,YYYY')&lt;br /&gt;from f_staffs&lt;br /&gt;&lt;br /&gt;2.select to_date('January 3,2004','mon dd,RRRR')&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;3.select to_date(start_date)as"Promotion on 10th-Feb-2004"&lt;br /&gt;from f_promotional_menus&lt;br /&gt;where code=110&lt;br /&gt;&lt;br /&gt;4.select 'Today is the'||' '|| to_char(sysdate,'Ddspth "of" month')||' '||to_char(sysdate,'Year')from dual&lt;br /&gt;&lt;br /&gt;5.select id,first_name,last_name,salary,to_char(salary,'$9999.99')&lt;br /&gt;from f_staffs&lt;br /&gt;&lt;br /&gt;6.select first_name,last_name,to_number('salary','$9999.99'),to_number('salary','$9999.99')+2000 as "New Salary"&lt;br /&gt;from employees&lt;br /&gt;where last_name='abel'&lt;br /&gt;&lt;br /&gt;7.select start_date&lt;br /&gt;from f_promotional_menus&lt;br /&gt;where code=110&lt;br /&gt;&lt;br /&gt;8.select to_char(to_date('25-dec-04','Month ddth,YYYY'))from dual&lt;br /&gt;select to_char(to_date('25-dec-04','MONTH ddTH,YYYY'))from dual&lt;br /&gt;select to_char(to_date('25-dec-04','month ddth,YYYY'))from dual&lt;br /&gt;&lt;br /&gt;9.select code,to_char(low_range,'$999999.99'),to_char(high_range,'$99999.99')from d_packages&lt;br /&gt;&lt;br /&gt;10.select to_date('JUNE 19,2004','fxMONTH DD,RRRR') FROM DUAL&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114170527996582530?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114170527996582530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114170527996582530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114170527996582530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114170527996582530'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/03/section2-lesson1.html' title='section2    lesson1'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114114985916141203</id><published>2006-02-28T09:33:00.000-08:00</published><updated>2006-03-03T09:53:22.036-08:00</updated><title type='text'>lesson4</title><content type='html'>1. round(86.678,2)from dual&lt;br /&gt;&lt;br /&gt;2.select title,upper(cd_number)as "DJ on Demand Collections"&lt;br /&gt;from d_cds&lt;br /&gt;&lt;br /&gt;3.select lower(last_name)||''||substr(upper(first_name),1,1)as "User Passwords"&lt;br /&gt;from d_partners&lt;br /&gt;&lt;br /&gt;4.select replace('HELLO WORLD','It is a small world')&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;5.select substr('fiddledeedum',1,9)||substr ('fiddledeedee',7,6)as "Nonsense"&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;6.select replace('mississpippi','i','$')&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;7.select round(5332.342,-2)from dual&lt;br /&gt;&lt;br /&gt;8.select round(3.14159,2)from dual&lt;br /&gt;&lt;br /&gt;9.select trunc(73.892,1)from dual&lt;br /&gt;&lt;br /&gt;10.select add_months(sysdate,6)as "Future" from dual&lt;br /&gt;&lt;br /&gt;11.select add_months(sysdate,120)as "Future" from dual&lt;br /&gt;&lt;br /&gt;12.select add_months('29-feb-04',48)as "Future" from dual&lt;br /&gt;&lt;br /&gt;13.select code,description from d_themes&lt;br /&gt;where description between 'ie%'and '%ie'&lt;br /&gt;&lt;br /&gt;14.select title,year from d_cds&lt;br /&gt;where year between 2000 and 2003&lt;br /&gt;&lt;br /&gt;15.select employee_id,hire_date from employees&lt;br /&gt;where hire_date between '01-jan-97'and sysdate&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114114985916141203?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114114985916141203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114114985916141203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114114985916141203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114114985916141203'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/02/lesson4.html' title='lesson4'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114084577951440186</id><published>2006-02-24T20:54:00.000-08:00</published><updated>2006-03-06T20:22:15.383-08:00</updated><title type='text'>LESSON 3</title><content type='html'>1.select id,name,round(months_between(sysdate,event_date),0)&lt;br /&gt;from d_events&lt;br /&gt;&lt;br /&gt;2.select round(months_between('31-dec-06','01-jan-06')*30.5,0)&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;3.select round(months_between('31-dec-06','01-jan-06')*30.5,0)&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;4.select trunc(round(sysdate,'month'),'month')as alias,trunc(round(sysdate,'year'),'year')as alias&lt;br /&gt;from dual;&lt;br /&gt;&lt;br /&gt;5.select last_day('01-JUN-05')AS "JUNE"&lt;br /&gt;FROM DUAL&lt;br /&gt;&lt;br /&gt;6.select round(months_between(sysdate,birthday)/12,'year')&lt;br /&gt;from dual &lt;br /&gt;where name='Bob Miller';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7.SELECT ADD_MONTHS(SYSDATE,6)AS"Appointment"&lt;br /&gt;FROM DUAL&lt;br /&gt;&lt;br /&gt;8.select LAST_DAY('01-FEB-06')AS "Deadline"&lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;9.select round(months_between('01-jan-07','27-aug-06'),0)as "BIRTHDAY DAY" &lt;br /&gt;from dual&lt;br /&gt;&lt;br /&gt;10.select next_day('27-aug-06','FRIDAY')AS "First Friday"&lt;br /&gt;from dual&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114084577951440186?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114084577951440186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114084577951440186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114084577951440186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114084577951440186'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/02/lesson-3.html' title='LESSON 3'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114083867551660665</id><published>2006-02-24T18:58:00.000-08:00</published><updated>2006-02-24T19:37:55.566-08:00</updated><title type='text'>LESSON 2</title><content type='html'>1.select last_name,salary,round(salary/1.55,2) from employees where employee_id between 100 and 102&lt;br /&gt;&lt;br /&gt;2.select last_name,trunc(salary*1.0533,2) as "salary" from employees where DEPARTMENT_ID=80&lt;br /&gt;&lt;br /&gt;3.select mod(38873,2) from dual &lt;br /&gt;(the answer is =1,so this is a odd number)&lt;br /&gt;&lt;br /&gt;4.1.select round(845.553,1)from dual&lt;br /&gt;    (The answer is 845.6)&lt;br /&gt;  2.select round(30695.348,2)from dual&lt;br /&gt;    (The answer is 30695.35)&lt;br /&gt;  3.select round(30695.348,-2)from dual&lt;br /&gt;    (The answer is 30700)&lt;br /&gt;  4.select trunc(2.3453,1)from dual&lt;br /&gt;    (The answer is 2.3)&lt;br /&gt;&lt;br /&gt;5.select last_name,salary&lt;br /&gt;from employees&lt;br /&gt;where mod(salary,3)=0&lt;br /&gt;&lt;br /&gt;6.select mod(34,8)as"EXMAPLE" from dual&lt;br /&gt;  (the answer is 2)&lt;br /&gt;&lt;br /&gt;7.select (0.004*1000)from dual&lt;br /&gt;  (the answer is 4)&lt;br /&gt;  select (0.004*100000)from dual&lt;br /&gt;  (the answer is 400)&lt;br /&gt;  select (0.004*10000000)from dual&lt;br /&gt;      (the answer is 40000)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114083867551660665?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114083867551660665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114083867551660665' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114083867551660665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114083867551660665'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/02/lesson-2.html' title='LESSON 2'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-114082545691150027</id><published>2006-02-24T15:56:00.000-08:00</published><updated>2006-02-24T15:57:36.923-08:00</updated><title type='text'>lesson1</title><content type='html'>Lesson1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Using the three separate words "Oracle," "Internet," and "Academy," use one command to produce the following output: &lt;br /&gt;The Best Class&lt;br /&gt;Oracle Internet Academy&lt;br /&gt;Select concat('Oracle','Internet')||'Academy' AS "The Best Class"&lt;br /&gt;From DUAL&lt;br /&gt;&lt;br /&gt;2. Use the string "Oracle Internet Academy" to produce the following output: &lt;br /&gt;The Net&lt;br /&gt;net&lt;br /&gt;Select substr('Oracle Internet Academy',13,3) AS "The Net"&lt;br /&gt;From DUAL&lt;br /&gt;3. What is the length of the string "Oracle Internet Academy"?&lt;br /&gt;Select length('Oracle Internet Academy')&lt;br /&gt;From DUAL&lt;br /&gt;&lt;br /&gt;4. What's the position of " I " in "Oracle Internet Academy"?&lt;br /&gt;&lt;br /&gt;Select instr('Oracle_Internet_Academy','I')&lt;br /&gt;From DUAL&lt;br /&gt;5. Starting with the string "Oracle Internet Academy", pad the string to create  ****Oracle****Internet****Academy****&lt;br /&gt;Select lpad('Oracle',10,'*')||lpad('Inernet',12,'*')||lpad('Academy',11,'*')||rpad('*',4,'*')&lt;br /&gt;From DUAL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Starting with the string "Oracle Internet Academy", pad the string to produce &lt;br /&gt;Oracle$$$Internet$$$Academy&lt;br /&gt;Select rpad('Oracle',9,'&amp;')||rpad('Inernet',11,'&amp;')||'Academy'&lt;br /&gt;From DUAL&lt;br /&gt;&lt;br /&gt;7. Using the string 'Oracle Internet Academy', produce the output shown using the REPLACE function.&lt;br /&gt;The Best Class&lt;br /&gt;Oracle 2004-2005 Academy&lt;br /&gt;&lt;br /&gt;Select replace('Oracle 2004-2005 Academy','Oracle Inernet Academy')AS " The Best Class" &lt;br /&gt;From DUAL&lt;br /&gt;&lt;br /&gt;8. List the order date and the order total from the Global Fast Foods F_ORDERS table.  Name the order total as TOTAL, and fill in the empty spaces to the left of the order total with $.&lt;br /&gt;select order_date,lpad('order total',7,'$')"TOTAL"&lt;br /&gt;from F_ORDERS&lt;br /&gt;&lt;br /&gt;9. Write a query that will output a column called “ADDRESS” which has the following information: ZOE TWEE 1009 OLIVER AVENUE BOSTON, MA 12889. Use the Global Fast Foods F_CUSTOMERS table.&lt;br /&gt;select first_name||' '||last_name||' '||address||' '||','||' '||city||' '||state||' '||zip||' '||'.'&lt;br /&gt;from F_CUSTOMERS&lt;br /&gt;where id=456&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-114082545691150027?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/114082545691150027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=114082545691150027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114082545691150027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/114082545691150027'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2006/02/lesson1.html' title='lesson1'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-112768293567040917</id><published>2005-09-25T14:08:00.000-07:00</published><updated>2005-11-12T17:47:12.930-08:00</updated><title type='text'>2nd draft</title><content type='html'>There is a big cultural difference between china and America. I lived in china for more than 17 years. The Chinese culture is a part of my life. A big change took place after I moved to America. Now I am starting a new life in America.&lt;br /&gt;&lt;br /&gt;When I was still on the plane before arriving in America, I felt very excited and happy.&lt;br /&gt;After I arrived in America, I felt that it is very hard for my new beginning.&lt;br /&gt;At first, since I am still at school age, I need to look for a school. This is the most important thing in America. I found several schools and they all said that I am overaged. they cannot accept me. I feel scared in this new world. I thought "Is there no more chance for me to go on my study? My life will become very boring." I do not want that to happen. Luckily, I find a school that I can go to. This is a school for immigrants--Lower East Side Prep. High School. There are a lot of students in the same situation like me in the school.&lt;br /&gt;&lt;br /&gt;Time flys day by day. I learn more and more culture and customs in America. I know it more that I see the more week of America. New York is a place where many immigrants live in. Though, people in America said "no prejudice and racial discrimination", but I can see it happening in many many places.&lt;br /&gt;    I remember when I came here always one year ago and my second auntie comes here less them half year ago. One time, my auntie and my old and worn down grandmother went into the subway station. My auntie forgot my grandmother who could meet use her metro card by herself and she could not help her. Those were not the bad things. The bad things is that they don not know any English word not even a world like help. They used body language to ask for help, but still nobody looked at them. Suddenly, a young teenage guy rubbed their metro card and ran away quickly. My auntie and grandmother shout “help” loudly in Chinese. Unfortunately nobody paid attention to them. My auntie felt very upset. Her metro card was a monthly pass that she just bought and when I heard that I felt raged and helpless. How come nobody could help them, I know language is very important that is what we need if we live in here.&lt;br /&gt;     Another story was in a winter morning. Everyone was in hurry to catch buses or subways to go to work or school. I was lucky; I caught the bus on time. The bus moved, I saw a Spanish woman running to the bus and signaled to stop. The driver did not stop the bus. In the next station, a slimily situation, the difference was a white man running to the bus. The driver stopped and smiled at him. I felt unfair. What kind of this society? How could the driver do that?&lt;br /&gt;     Whatever, I know one person can not change the society. But I only understand, I must study hard, speak the language and may be I won’t be the next victim. Sometimes this society is ruthless.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-112768293567040917?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/112768293567040917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=112768293567040917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/112768293567040917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/112768293567040917'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2005/09/2nd-draft.html' title='2nd draft'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16568821.post-112708596443291010</id><published>2005-09-18T15:55:00.000-07:00</published><updated>2005-09-18T16:26:04.450-07:00</updated><title type='text'>来美的经历</title><content type='html'>中国的文化与美国的文化有着很大的区别.我在中国已经生活了十多年,中国的文化对于我来说早已经是我生活的一部分.一个大转变,由中国移民到了美国使我感受到中国对于我来说已经是一个终点,来到美国是我的一个新的开始.&lt;br /&gt;  当我仍然坐在飞机上还没有真正踏入美国的领土的时候,我的心情仍然是对美国充满了希望.但当我真正踏入美国,接触美国的时候,我就觉得这是一个很难的开始.我是在学习的阶段来到美国,所以我一来到了美国,最重要的事情就是找学校.在中国读书是自己付钱,所以是没有年龄的限制.但我在这边找了几间学校,他们都说我的年龄已经不太适合读高中,他们不接受我.我对这个新来的世界开始充满了恐惧,我想,难道我就这样开始要找工作,就这样过我的一生吗?我不希望是这样,好在后来我找到了我现在的这所学校.这是一所新移民的学校,在这校里面的人都跟我差不多,年龄大,英文不是很好,所以我在一种家庭的感觉.&lt;br /&gt;  时间一天一天地过去了,我对美国的文化,习俗也慢慢地开始了解了.我了解它越深我就看到它越多的缺点.纽约是一个集中了各种各样的移民,虽然美国声称不能有歧视和偏见这些事情存在,但对些事情却发生于不同种族之间.&lt;br /&gt;  就拿我们中国人来说,我读书的那所学校虽然大多数是中国人,老师也有很多都是中国人,但也有一些是外国人.我第一个学期来到这所学校就有一堂体育课,在这堂课里,在一部分是中国人,一部分是外国人.我在这堂课里认识了几位跟我背景差不多的女同学.这堂课的老师是一位白人,而且我觉得他对我们中国人很人偏见,因为我们不会讲英文.我记得有很多的时候,他明知我不太会英文,却偏要我做示范给同学看,这样经常使我在同学面前出羞.而且他不太相信我们的话,我们有事情要请假,就算是拿出了请假条,他都不太相信.但外国的同学只要跟他说一声,他就说行啦.而且我们要做的事情永远都比外国的同学多.我真的觉得这位老师很不公平,这不但是我的感觉,连我认识的一些同学都有这样的感觉.&lt;br /&gt;  人的体育课已经完满结束了,我觉得我好像脱离了那种无形的压力.但我知道我仍然还有很多类似这样的问题要面对,但我同样知道,我是一定可以面对和解决到这些问题.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(还没有经过修改)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16568821-112708596443291010?l=luckyleaves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luckyleaves.blogspot.com/feeds/112708596443291010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16568821&amp;postID=112708596443291010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/112708596443291010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16568821/posts/default/112708596443291010'/><link rel='alternate' type='text/html' href='http://luckyleaves.blogspot.com/2005/09/blog-post_18.html' title='来美的经历'/><author><name>luckyleaves</name><uri>http://www.blogger.com/profile/02206755044842146929</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
