Write and run SQL statements - What is the max balance

Assignment Help Database Management System
Reference no: EM131826586

Assignment - Query and update databases using SQL

This assignment requires you to use SQLite to complete the tasks listed below.

Task - Write and run SQL statements to complete the following tasks

Part A - DML

1. Locate the record in the vendor table that does not have a value for the attribute V_STATE

2. Find the customers whose balance is greater than $300 but less than $400.

3. Show the names of the customers for whom we have invoices.

4. What is the max balance?

5. Show the CUS_CODE of the customers for whom we DO NOT have invoices.

6. Show the names of the customers for whom we DO NOT have invoices.

7. Find out how many times a customer generated an invoice - make sure the counted column heading reads "Invoices_generated".

8. List the names of the customers and how many times a customer generated an invoice - make sure the counted column heading reads "N_Of_Invoices".

Part B - DDL

1. Add a new row/record to the 'customer' table to include your actual student_ID in the CUS_CODE, your last name as the CUS_LNAME' and your firstname as CUS FNAME. Add any other details of your choice in all the other fields.

2. Add a new attribute (field) credit_history VARCHAR(6) to the customer table.

3. Update credit history for customer '10011' to 'Bad'.

4. Delete the employee Leighla Genkazi from the EMP table.

5. Add a new attribute called 'email_address' to 'emp' table with data type and length 'VARCHAR(20).

You are required to submit:

1. The SQL statements for each query, which should be copied from your SQLite3 Command Line and pasted into your submission file. If you type .echo on at the SQLite3 Command Line, SQLite will output your SQL statement with the results of the query making it easy to copy and paste both.

2. The screenshots of the results of the SQL statements which are to be copied from your SQLite3 Command Line and pasted into your submission file immediately after you execute the SQL query. If you used an output file please submit only the output file.

Reference no: EM131826586

Questions Cloud

Discuss employee and management responsibilities : Discuss employee and management responsibilities with regards to Information Security and combatting SE. Make sure your work clarifies your opinion.
Unemployment and relationship problems : Unemployment and relationship problems. A USA Today/Gallup poll conducted between 2010 and 2011 asked a group of unemployed and underemployed Americans.
Point estimate can be statistically significant : "With large sample sizes, even small differences between the null value and the point estimate can be statistically significant."
Examine what should not be included in the policy : To keep the scope narrow, your group should first describe what should be included and what should not be included in the policy.
Write and run SQL statements - What is the max balance : Task - Write and run SQL statements to complete the following tasks - Find the customers whose balance is greater than $300 but less than $400
Conduct a hypothesis test based on a sample : Same observation, different sample size. Suppose you conduct a hypothesis test based on a sample where the sample size is n = 50, and arrive.
Interpret this interval in context of the data : (a) Interpret this interval in context of the data. (b) What does "95% confident" mean? Explain in the context of the application.
Review problem on human-computer interface journal : Keep a human-computer interface (HCI) journal with your weekly observations of HCI issues that pertain to you, your work, your family, and your friends.
Estimate the average emergency room waiting : Waiting at an ER, Part I. A hospital administrator hoping to improve wait times decides to estimate the average emergency room waiting time at her hospital

Reviews

len1826586

1/22/2018 5:23:34 AM

NOTES - This assignment requires you to use SQLite to complete the tasks listed below. Student can also use SQL Workbench or another software (if they are familiar) to complete the tasks. Typing the SQL statements or the results is NOT acceptable. Instructions for using SQLite: From Resources under Main Menu in Interact 2 go to Assignment 5 Folder, Copy sqlite3.exe and cmd.exe files from the Assignment 5 Folder into a folder in your machine\ Copy a5.txt from the Assignment 5 Folder into the folder in your machine where your SQLite file is located. From the SQLite Command Prompt execute the a5.txt script. To do this, at the SQLite Command Line type .read a5.txt [to create the tables you will use to answer this assignment's questions]. At the SQLite Command Line type .headers on and At the SQLite Command Line type .mode column.

len1826586

1/22/2018 5:23:20 AM

This assessment aligns with the following subject outcomes: be able to critically analyse and modify an existing database design to meet new business requirements. SQL syntax returns all attributes that meet the business requirement from the tables that hold the data and applies the correct restrictions to retrieve the required information. Requirements – Either submit your assignment as a PDF or a Word document. Don’t use any other file formats. Please include your student ID, name and subject code in your submission.

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd