Week1_DiscussionTopic2.docx - Week#1 Disccusion MIS582 The...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Week#1 Disccusion MIS582 The following tables filled with data have already been created: CUSTOMER (CustomerSK, Name, Phone, EmailAddress) STOVE (SerialNumber, Type, Version, DateofManufacture) REGISTRATION (CustomerSK, SerialNumber, Date) STOVE_REPAIR (RepairInvoiceNumber, SerialNumber, Date, Description, Cost, CustomerSK) Given these tables, write the SQL code to accomplish the following requests. 1. Show all of the data in each of the four tables. 2. List the names and e-mail addresses of all customers who have had a stove repair that costs more than $50. 3. List all versions of stoves of type "Maytag" that have no record of being repaired. You can view the Microsoft tutorial, Create Queries for a New Database, found in the lecture to learn how to test your queries in Stoves.accdb. Don't worry about your SQL code being completely correct. It's more important for us to see different SQL code so we can evaluate and learn from the differences. SELECT * FROM CUSTOMER; SELECT * FROM STOVE; SELECT * FROM REGISTRATION; SELECT * FROM STOVE_REPAIR; 2: List the name and email addresses of all customers who have had a stove repair that cost more than $50. SELECT Name, EmailAddress FROM CUSTOMER WHERE CustomerSK IN (SELECT CustomerSK FROM STOVE_REPAIR
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
WHERE Cost > 50.00); Herbert Kaatz Herbert Kaatz 2 Jan 2018Local: 2 Jan at 9:36<br>Course: 2 Jan at 7:36 Manage discussion entry Professor/Class Given these tables, write the SQL code to accomplish the following requests. 1. Show all of the data in each of the four tables. SELECT * FROM CUSTOMER SELECT * FROM STOVE SELECT * FROM REGISTRATION SELECT * FROM STOVE_REPAIR 2. List the names and e-mail addresses of all customers who have had a stove repair that costs more than $50. SELECT Name, EmailAddress FROM CUSTOMER, STOVE_REPAIR WHERE CUSTOMER.CustomerSK = STOVE_REPAIR.CustomerSK AND Cost> 50
Image of page 2
3. List all versions of stoves of type "Maytag" that have no record of being repaired. SELECT Version FROM STOVE WHERE REGISTRATION.SerialNumber = STOVE_REPAIR.SerialNumber Ronnie Warren Ronnie Warren 2 Jan 2018Local: 2 Jan at 9:42<br>Course: 2 Jan at 7:42 Manage discussion entry Not certain of the format but I will give it a shot: 3. List all versions of stoves of type "Maytag" that have no record of being repaired. SELECT STOVE.[Maytag], STOVE_REPAIR.[SerialNumber] FROM STOVE, STOVE_REPAIR WHERE [RepairInvoiceNumber] IS NULL; Lester Osotio Lester Osotio 2 Jan 2018Local: 2 Jan at 17:58<br>Course: 2 Jan at 15:58 Manage discussion entry 1. Show all of the data in each of the four tables. SELECT CustomerSK, Name, Phone, EmailAddress FROM CUSTOMER SELECT SerialNumber, Type, Version, DateofManufacture
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
FROM STOVE SELECT CustomerSK, SerialNumber, Date FROM REGISTRATION SELECT RepairInvoiceNumber, SerialNumber, Date, Description, Cost, CustomerSK FROM STOVE_REPAIR Mustafha Lokman Mustafha Lokman 3 Jan 2018Local: 3 Jan at 2:59<br>Course: 3 Jan at 0:59 Manage discussion entry 1. Show all of the data in each of the four tables.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern