Write and run sql statements to complete the tasks

Assignment Help PL-SQL Programming
Reference no: EM131839017

Task

This assignment requires you to use SQLite to complete the tasks

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
- At the SQLite Command Line type .mode column

Assignment tasks:

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.

Attachment:- assignment.rar

Reference no: EM131839017

Questions Cloud

Contributory or comparative negligence theory : Does Indiana's jurisdiction follow a contributory or comparative negligence theory? How does this impact the outcome of lawsuits?
The average stock price along the relevant price path : An Asian option pays the maximum of either 0 or the difference between the final stock price and the average stock price along the relevant price path.
Particular corporation while neglecting the others : Is it permissible for Denny to have access to all the business deals of these corporations?
Determine strong impression during interviews : Assume that a friend of yours informed you she is planning on getting a tattoo. She will be graduating from a university with a degree in business.
Write and run sql statements to complete the tasks : Find the customers whose balance is greater than $300 but less than $400 - Find out how many times a customer generated an invoice
What do you understand by the term obligation : What do you understand by the term obligation, which sorts of obligations does the law enforce and what are the difficulties in it doing so
Maximum price of stock over the period of the asset : A Whoey pays the difference between the final price and the maximum price of a stock over the period of the asset.
Write a program to plot the given face : Write a program to plot the following face. Provide a class FaceViewer and a class Face Component. Write a program that draws a picture of a house.
Commonly used law office technologies : Identify at least (2) commonly used law office technologies. Next, explain the main reasons why you think computer skills are essential for the paralegal

Reviews

len1839017

1/30/2018 5:27:03 AM

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. SQL syntax returns all attributes that meet the business requirement from the tables that hold the data with minor omissions and applies appropriate restrictions to retrieve the required information. SQL syntax returns key attributes that meet the business requirement from the tables that hold the data and applies relevant restrictions to retrieve the required information. SQL syntax returns key attributes that meet the business requirement from the tables that hold the data but the restrictions applied to retrieve the required information contain minor errors.

len1839017

1/30/2018 5:26:57 AM

Need it as per the guidelines - • This assignment requires you to use SQLite to complete the tasks listed below.Student can also use SQL Workbench or another software to complete the tasks. This assessment aligns with the following subject outcomes: • be able to critically analyse and modify an existing database design to meet new business requirements;

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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