Preview

MIS562 W2 Assignment 2

Satisfactory Essays
Open Document
Open Document
2384 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
MIS562 W2 Assignment 2
Name: _______________________

Homework (100 points) Resources:
- demo.sql
- demoaddrows.sql
- createStudent.sql
Part 1
Create the tables from demo.sql script
1. Download the demo.sql and createStudent.sql file from the Doc Sharing. Run demo.sql and createStudent.sql in MySQL Omnymbus Environment. This will create some tables and insert data into them. View the script in notepad to determine the table names that were created. Use the describe command to view the structure of the tables.
2. Please use the template below to provide your solutions. You must submit your Input SQL Query in the second column in the template and you must also include executed output of each input query below input SQL Query. Please truncate to 20 rows, if output is more than 20 rows. Any answers without executed output WILL NOT earn any credit.
3. Please use demo.sql for questions Q1 through Q12 and remaining questions use createStudent.sql
4. If you combined demo.sql and createStudent.sql under MIS562_xxxx database, then there is no need to change database.
Write SQL statements to solve the following requests.
Question (4 pts per question)
SQL statement and answer output
1. List all employee information in department 30.
SELECT *
FROM EMP
WHERE DEPTNO=30;
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
COMM
DEPTNO
7499
ALLEN
SALESMAN
7698
1980-12-17
1600.00
300.00
30
7521
WARD
SALESMAN
7698
1980-12-17
1250.00
500.00
30
7654
MARTIN
SALESMAN
7698
1980-12-17
1250.00
1400.00
30
7698
BLAKE
MANAGER
7839
1980-12-17
2850.00
NULL
30
7844
TURNER
SALESMAN
7698
1980-12-17
1500.00
0.00
30
7900
JAMES
CLERK
7698
1980-12-17
950.00
NULL
30

2. List employees name, job, and salary that is a manager and has a salary > $1,000
SELECT ENAME, JOB, SAL
FROM EMP
WHERE JOB="MANAGER"
AND SAL > 1000;
ENAME
JOB
SAL
JONES
MANAGER
2975.00
BLAKE
MANAGER
2850.00
CLARK
MANAGER
2450.00

3. Repeat exercise 2 for any employee that is not a manager or earns a salary > $1,000
SELECT ENAME, JOB, SAL
FROM EMP
WHERE

You May Also Find These Documents Helpful

  • Good Essays

    This case is an interesting one because it gets right into the core of the confliction between the proprieties of contractual agreement. This case is focused primarily on Osborne Development Corp. and the multiple defects customers are experiencing with their homes. These upset customers are suing this Corporation in attempts to collect reparations for the discrepancies faced. The homeowners who purchased homes form Osborne Development Corp. (ODC) negligently purchased these homes. According to the Home Buyers Warranty ( HBW), “ Any and all claims disputes and controversies by or between the Homeowner, the Builder, the Warrant Insure and/or HBW…

    • 527 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    2. $5000 in equipment is received, with $1000 paid in cash, and $4000 billed through Accounts Payable…

    • 683 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Now, select a virtual switch depending on how you have configured the host. Proceed to the configuration of port properties. Give the port a specific name. I have given the label as ‘VMK’. Enter VLAN ID if there is any or else chose ‘None’. Put a check next to the ‘Virtual SAN traffic’ box and then click ‘Next’. Now start with configuring IPv4 settings for this port. After completing that, click ‘Next’. Click on the finish button to end the configuration for port group creation. Make sure that the group is created. Again a new window will pop up showing the devices created and their respective IP addresses. After confirming that the host is created, repeat this procedure two more times, since we require at least three hosts for configuring VSAN.…

    • 229 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    DBM380 Week 2

    • 837 Words
    • 3 Pages

    There will be seven tables in this database source system order data, customer data, corrections table data, drop ship corrections, workflow status, end system data, and comparison results table. The source system table will be comprised of columns for customer purchase order number, customer name, transmitted date, and status. The customer table will consist of columns for customer name and customer number. Corrections table will provide columns for customer purchase order number, system reference data, date received and error message. Drop ship table…

    • 837 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Hiredate DATE No No Job VARCHAR2(15) No No Mgrno number(4) no no yes ( to emp.empno) Salary number(8,2) no no Comm number(8,2) no no Deptno number(2) no no yes ( to…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Name your Access database file using Lab3_, your first initial, and your last name (e.g., Lab3_JSmith.accdb). Create and save your Access database file. When you are done, submit your database to the Course Project Dropbox.…

    • 694 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 5 Assignment 1

    • 1348 Words
    • 6 Pages

    4. The server accept the connection and to send the data from server to client and vice…

    • 1348 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Which of the following answers are true about random-access memory (RAM) as it is normally used inside a personal computer? ( choose two answers)…

    • 957 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Richman Investment needs and new enterprise encryption strategy. This is for a more secure network. They are wanting to grow to 10,000 employees worldwide. Richman Investment wants to operate out of 20 different countries in the future. This is very easy to do but to have a secure network there are many things that would have to happen which will make this more difficult to do. Have a secure network takes a lot of work and has to be monitored 24 hours a day 7 days a week. There are many different ways to go about this topic the one I am going to pick is a public key infrastructure (PKI).…

    • 444 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Hrm 534 Assignment 3

    • 1234 Words
    • 4 Pages

    IBM Global Services, the technology services and consulting division of International Business Machines (IBM), is the world’s largest provider of systems integration and technology consulting. It offers services in areas such as application development, data storage, infrastructure management, networking, and technical support (Datamonitor Plc., 2007, p.4). IBM Global Services is also among the world leaders in providing business consulting and outsourcing services. IBM Global Services’ headquarter locates in Armonk, New York. The company has more than 190,000 employees around the world.…

    • 1234 Words
    • 4 Pages
    Better Essays
  • Good Essays

    1. Summarize the developmental progressions the author describes. What are key points early childhood teachers should keep in mind as they are growing young children to have a firm foundation in math?…

    • 680 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Btec

    • 1256 Words
    • 6 Pages

    Deadlines: If you do not meet the deadlines for handing in your assignments you may not have your work marked. This could result in you failing the course unless there are exceptional circumstances which must be explained to your tutor and agreed by the Curriculum Manager. Your work should be returned to you marked within 10 working days…

    • 1256 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Typically the infant is found dead after having been put to bed, and exhibits no signs of having suffered.[7]…

    • 681 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    In my opinion, Texas decided to leave the American Union because its fear of isolation from majority of the union, particularly the north. Also, escalation of fear and paranoia already took Texas by storm due to talk of the abolition of slavery. Lincoln won the presidential election of 1861 and the Republicans took control of the executive branch. With the Republicans now “strong enough in numbers”, Texas feared their rights would be taken for granted and the union would only fulfill the northern states wishes. Texas doubt was not without reason as Lincoln argued that all territories should be free and not allow slavery.…

    • 170 Words
    • 1 Page
    Satisfactory Essays
  • Powerful Essays

    Andersonville Prison

    • 4639 Words
    • 19 Pages

    When one turns on the television today they are made witness to all the crimes that are present in society. It is impossible to sit through thirty-five minutes of news without anger and rage becoming aroused. This is because society is bothered by infinitesimal paraphernalia. Society also believes in human rights and punishment for those who violate such rights. Yet what constitutes humanity? Ever sit there and watch the news and wonder just how far humanity reaches? When is it time to say this is a human rights violation? Every wonder when someone 's morals and ethics begin to effect their ability to do their job? Ever wonder why in every news story the "bad guy" always become caught? Ever wonder how many people on death row might not be guilt? Some of them could have even been used as scapegoats. Yet how does one become a scapegoat? Could someone out there have that much hatred and anger to blame one person for the faults of many? Is the need for blame significant? Does desire lead to more hatred and evil? What does it feel like to be blamed for something that might not be wrong, and to be put on trial knowing that the jury wants to blame someone? In society and in the United States since its founding, there has been a need to place blame. Imagine how the person being blamed would feel. Henry Wirz did not have to image it; he lived through it and died for it. Someone is always to be blamed, even if they were just following orders. Orders which can only go so far until humanity takes effect. Henry Wirz was used as a scapegoat for war crimes committed during the Civil War at Andersonville Prison, however that does not justify his acts or make him an American hero.…

    • 4639 Words
    • 19 Pages
    Powerful Essays

Related Topics