ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 5 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 25 May 2017 My Price 11.00

Part A - DML List the record/s in the vendor table

Write and run SQL statements to complete the following:

 

Part A - DML

  1. List the record/s in the vendor table that do not have a value for the attribute V_STATE.
  2. Find the customers whose balance is greater than $250 but less than $400.
  3. Create a query based on invoice table to show a 15% increase on tax.
  4. Show the names of the customers for whom we have generated any invoices.
  5. Show the CUS_CODE of the customers for whom we DID NOT generate invoices.
  6. Show thenames of the customers for whom we DID NOT generate 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" .
  9. Find the customers whose last name is either Dunne, Orlando or Brown and live in area 615, sort in alphabetical order by the CUS_LNAME.

 

Part B - DDL

  1. Add a new attribute called 'email_address' to 'emp' table with data type and length 'VARCHAR-20'.
  2. Add a new row/record to the `customer` table to include your actual student ID in the CUS_CODE, your lastname as the CUS_LNAME` and your firstname as CUS_FNAME. Add any other details of your choice in all the other fields.
  3. Delete all the vendors in the FL state.

 

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
  2. The screenshots of the results of the SQL statements which are to be copied from your MySQL Workbench screen or SQLite3 Command Line and pasted into your submission file immediately after you execute the SQL quer

 

CREATE DATABASEIF NOT EXISTS `assignment5` /*!40100 DEFAULT CHARACTER SETlatin1 COLLATE latin1_bin */;USE `assignment5`;-- MySQL dump 10.13Distrib 5.5.16, for Win32 (x86)---- Host: localhostDatabase: assignment5-- -------------------------------------------------------- Server version 5.5.28/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;/*!40101 SET NAMES utf8 */;/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;/*!40103 SET TIME_ZONE='+00:00' */;/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0*/;/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;---- Table structure for table `customer`--DROP TABLE IF EXISTS `customer`;/*!40101 SET @saved_cs_client= @@character_set_client */;/*!40101 SET character_set_client = utf8 */;CREATE TABLE `customer` (`CUS_CODE` int(11) DEFAULT NULL,`CUS_LNAME` varchar(15) COLLATE latin1_bin DEFAULT NULL,`CUS_FNAME` varchar(15) COLLATE latin1_bin DEFAULT NULL,`CUS_INITIAL` varchar(1) COLLATE latin1_bin DEFAULT NULL,`CUS_AREACODE` varchar(3) COLLATE latin1_bin DEFAULT NULL,`CUS_PHONE` varchar(8) COLLATE latin1_bin DEFAULT NULL,`CUS_BALANCE` float DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;/*!40101 SET character_set_client = @saved_cs_client */;---- Dumping data for table `customer`--LOCK TABLES `customer` WRITE;/*!40000 ALTER TABLE `customer` DISABLE KEYS */;INSERT INTO `customer` VALUES (10010,'Ramas','Alfred','A','615','844-2573',0),(10011,'Dunne','Leona','K','713','894-1238',0),(10012,'Smith','Kathy','W','615','894-2285',345.86),(10013,'Olowski','Paul','F','615','894-2180',536.75),(10014,'Orlando','Myron','','615','222-1672',0),(10015,'O\'Brian','Amy','B','713','442-3381',0),(10016,'Brown','James','G','615','297-1228',221.19),(10017,'Williams','George','','615','290-2556',768.93),(10018,'Farriss','Anne','G','713','382-7185',216.55),(10019,'Smith','Olette','K','615','297-3809',0);/*!40000 ALTER TABLE `customer` ENABLE KEYS */;UNLOCK TABLES;---- Table structure for table `emp`--DROP TABLE IF EXISTS `emp`;/*!40101 SET @saved_cs_client= @@character_set_client */;

Answers

(11)
Status NEW Posted 25 May 2017 03:05 AM My Price 11.00

-----------

Not Rated(0)