Preview

SQL Queries Homework Week 4

Good Essays
Open Document
Open Document
1542 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
SQL Queries Homework Week 4
1.
SELECT e.ename, e.deptno, d.dname, d.deptno FROM dept d LEFT OUTER JOIN emp e ON d.deptno = e.deptno ORDER BY d.deptno;

SQL> SELECT e.ename, e.deptno, d.dname, d.deptno 2 FROM dept d 3 LEFT OUTER JOIN emp e 4 ON d.deptno = e.deptno 5 ORDER BY d.deptno;

ENAME DEPTNO DNAME DEPTNO
---------- ---------- -------------- ----------
MILLER 10 ACCOUNTING 10
KING 10 ACCOUNTING 10
CLARK 10 ACCOUNTING 10
FORD 20 RESEARCH 20
ADAMS 20 RESEARCH 20
JONES 20 RESEARCH 20
SMITH 20 RESEARCH 20
SCOTT 20 RESEARCH 20
JAMES 30 SALES 30
TURNER 30 SALES 30
BLAKE 30 SALES 30

ENAME DEPTNO DNAME DEPTNO
---------- ---------- -------------- ----------
MARTIN 30 SALES 30
WARD 30 SALES 30
ALLEN 30 SALES 30 OPERATIONS 40 STARFLEET 60

16 rows selected.
2.
SELECT e.ename, e.deptno, d.dname, d.deptno FROM emp e LEFT OUTER JOIN dept d ON e.deptno = d.deptno ORDER BY e.deptno, e.ename;
SQL> SELECT e.ename, e.deptno, d.dname, d.deptno 2 FROM emp e 3 LEFT OUTER JOIN dept d 4 ON e.deptno = d.deptno 5 ORDER BY e.deptno, e.ename;

ENAME DEPTNO DNAME DEPTNO
---------- ---------- -------------- ----------
CLARK 10 ACCOUNTING 10
KING 10 ACCOUNTING 10
MILLER 10 ACCOUNTING 10
ADAMS 20 RESEARCH 20
FORD 20 RESEARCH 20
JONES

You May Also Find These Documents Helpful

  • Satisfactory Essays

    BC3020 Week 5 Assignment

    • 271 Words
    • 2 Pages

    1. Q) What sections of the CPT will commonly be used when coding for cardiovascular services?…

    • 271 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Use SQL*Loader For dept table: Control File: load data infile 'dept.dat ' "var 3" into table dept fields terminated by ', ' optionally enclosed by '" ' (col1 NUMBER(2), col2 VARCHAR2(30), col3 VARCHAR2(20) ) From Command Prompt: SQLLDR CONTROL= dept.ctl, LOG=bar.log, BAD=baz.bad, DATA= dept.dat USERID=student/student, ERRORS=999, LOAD=2000, DISCARD= toss.dis, DISCARDMAX=5…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    STR 581 Week 4 Quiz

    • 341 Words
    • 2 Pages

    10. Companies that pursue this value discipline strive to produce a continuous stream of state-of-the-art products and services.…

    • 341 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    XACC/291 – Week 4 Assignment Complete Exercises E10-6, E10-8, & E10-18. And Problems 10-3A & 10-6A. E10-6 Payroll Tax Expense $352.16 FICA Taxes Payable 198.40 Federal Unemployment Taxes Payable 19.84 State Unemployment Taxes Payable 133.92 (…

    • 338 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Week 2 Homework Assn 1

    • 616 Words
    • 2 Pages

    The only two that are excluded from income are (b), (c) and (d)… (a) $100 found is the only thing considered as income. Inheritance is not, the loan is not because there were no specific terms agreed upon for repayment (no strings attached) and not on child support.…

    • 616 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    STR 581 Week 3 Quiz

    • 428 Words
    • 2 Pages

    9. This is an internal analysis technique wherein strategists examine customers’ needs, company offerings, and competitors’ offerings to more clearly articulate what their company’s competitive advantage is and how it differs from those of competitors.…

    • 428 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Problem set 4

    • 380 Words
    • 2 Pages

    Suppose that the reserve requirement is 10 percent and the balance sheet of the People's National Bank looks like the accompanying example.…

    • 380 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Study Questions 4

    • 480 Words
    • 2 Pages

    Non-installment credit refer to a system of credit that is payable in one lump-sum amount by a specified date…

    • 480 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Homework 6 Questions

    • 942 Words
    • 4 Pages

    f. Tumeric (roots) may reduce ____________ and relieve ___________ but is not safe for people with ____________ disease.…

    • 942 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Dbq #3

    • 809 Words
    • 4 Pages

    During the early 1800's France and Britain were at war and for many years America remained neutral. But, Great Britain began seizing American ships and through the practice of impressments made the Americans join the British Navy. Great Britain was also starting to supply the Native Americans in North America with guns and, in response America finally declared war on Britain in 1812. The title "Era of Good Feelings" was used to describe the presidency of James Monroe in 1816 but the truth of this phrase is questioned. Many believe that the period after the war of 1812 was an "Era of Good Feelings" due to the nation's gain of nationalism and expansion of the country, but it was also due to the growing sense of sectionalism and state issues.…

    • 809 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    In 1732, the slave ship Diligent under Captain Pierre Mary purchased slaves from Jacquin and transported them to Martinique.…

    • 361 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    • Develop at least two tables, using the same step of the accounting cycle selected for your previous Learning Team assignments, that could be used in a database for your selected accounting cycle.…

    • 103 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Week 3 Homework

    • 396 Words
    • 2 Pages

    Operant Conditioning molds behavior by the consequences of an individual through punishment, reinforcement and extinction. Observational Learning happens from observing the behavior of other individuals. Social Learning is a behavior learned from a social environment. Prejudice is developed and nurture through classical and operant conditioning from an early age when an individual acts prejudice towards something and is rewarded for acting in such a way or saying such things. For example A parent, say father, says (and please do not take offence towards this it is only an example!) “Stupid wet-back, they’re no good for anything but taking our jobs!” a son or daughter will learn that this is applicable behavior. Then when the child, son or daughter, says something along the same lines around his or her father the father would agree, laugh or show affection towards the child’s comment. Thus the behavior is not being corrected allowing the ignorant behavior to continue. For my presentation I would use Rhyme-keys and Loci Method to help me remember notes and slides. I would Use Rhyme-keys for myself on key words in the slides to help me remember key ideas with Loci Method with pictures and diagrams in the slides to better help my memory. For example if I had a slide on the marketing sale rates on, say computers being sold I would use a graph with percentages over time with a scale on sale rate, I would use key words to explain the key points for why there is a clime or fall in sales. Cognitive, physiological, and behavioral are the three qualities. Cognitive is a mental process that involves memory, attention, understanding language, producing language, reasoning, problem solving and decision making. Physiological deals with the understanding of one’s own body, hygiene and appearance. Emotional is in regards to self-awareness, self-regulation, motivation, empathy and social skills. If I were interviewing applicants for a position in my company I…

    • 396 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    IIS Smooth Streaming Management REST Services authorization is performed by checking user access rights to the publishing point (.isml) file. GET operations require read access to the publishing point file. PUT or DELETE operations require write access for the files. Creating a new publishing point using the POST operation…

    • 390 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Midterm Quiz

    • 623 Words
    • 3 Pages

    30 Multiple-Choice and True/False questions. Please highlight the correct answer. Once completed submit it as an attachment to the Assignment Link:…

    • 623 Words
    • 3 Pages
    Satisfactory Essays