Show the names of the customers for whom we have invoices

Assignment Help Database Management System
Reference no: EM131836851

Query and update databases using SQL

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.

For guidance on how to install SQLite, watch this short YouTube video: How to download and install SQLite by Yeslam Al-Saggaf

For guidance on how to create tables using SQLite, watch this short YouTube video: How to import a table into an SQLite database by Yeslam Al-Saggaf

Write and run SQL statements to complete the following tasks

Part A - DML

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

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

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

What is the max balance?

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

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

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

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

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.

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

Update credit_history for customer '10011' to 'Bad'.

Delete the employee Leighla Genkazi from the EMP table.

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

You are required to submit:

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

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.

Requirements

1 Either submit your assignmentasa PDFora Word document.

2 Don't use any other file formats.

3 Please include your student ID, name and subject code in your submission.

Referencing: APA

Verified Expert

This assignment is related to DML (data manipulation) and DDL(Data definition language) commands.Queries are written using Oracle SQL * PLUS.DML commands are used for manipulating data in the database. DDL commands are used for modifying the table structure in the database.

Reference no: EM131836851

Questions Cloud

Illustrate the roles that factual information and inferences : Illustrate the roles that factual information, inferences, and judgments play in the main character(s) major decisions.
Why is resistance an important issue in disease prevention : What are we talking about when we discuss resistant microorganisms? Why is resistance an important issue in disease prevention?
Collection of microorganisms that colonize our bodies : 1. The _____________ is the collection of microorganisms that colonize our bodies.
Analyze what the idea of wrestling with god means for jews : Analyze what the idea of wrestling with God means for Jews. The textbook refers to the story from Genesis chapter 32 in which Jacob is renamed Israel.
Show the names of the customers for whom we have invoices : Delete the employee Leighla Genkazi from the EMP table - Find out how many times a customer generated an invoice - make sure the counted column heading reads
Cycle for replication in trypanosoma cruzi : What is the critical stage in the life cycle for replication in Trypanosoma cruzi?
Identify your federal and state representatives : Identify your federal and state representatives. For those of you who reside outside the U.S., identify your local and territorial officials.
Briefly explain the cash flow statement : Briefly explain the Cash Flow Statement. Which financial statement contains Assets, liabilities and stockholder's equity
Review thoughts on playing the staffing accordion : What Are Your Thoughts On Article? Cohen, E. (2007). Playing the Staffing Accordion. Business NH Magazine, 24(3), 14.

Reviews

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