Question

QUESTION 5 The ACCOUNT table contains these columns: ACCOUNT_ID NUMBER(12) NEW_BALANCE NUMBER(7,2) PREV_BALANCE NUMBER(7,2) FINANCE_CHARGE NUMBER(7,2)...

QUESTION 5

  1. The ACCOUNT table contains these columns:

    ACCOUNT_ID NUMBER(12)

    NEW_BALANCE NUMBER(7,2)

    PREV_BALANCE NUMBER(7,2)

    FINANCE_CHARGE NUMBER(7,2)

    You must create statements to be mailed to all account holders. Each customer's statement must include the account holder's previous balance and finance charge

    (0.09 of previous balance) in this format:

    Previous Balance:   5000 &  Finance Charge: 45

    Which SELECT statement will produce these results?

    A.

    SELECT Previous Balance: || prev_balance || & Finance Charge:

    || prev_balance * .009  

    FROM account;

    B.

    SELECT 'Previous Balance:' || prev_balance   ||  ' & Finance Charge:'

      || prev_balance * .009

    FROM account;

    C.

    SELECT 'Previous Balance: ' || prev_balance || ' & Finance Charge: '

    || prev_balance * .009

    FROM account;

    D.

    SELECT "Previous Balance: " || prev_balance || " & Finance Charge: "

    || prev_balance * .009

    FROM account;

2 points   

QUESTION 6

  1. The DEPT table contains these columns:

    Name   Null?      Type

    ---------------------  ----------------  --------------

    DEPTNO NOT NULL VARCHAR2(2)

    DNAME NOT NULL VARCHAR2(30)

    LOC       VARCHAR2(30)

    With the least amount of efforts, you want to display all of the rows in the DEPT table. Which query should you use?

    A.

    SELECT *

    FROM dept;

    B.

    SELECT all

    FROM dept;

    C.

    SELECT any

    FROM dept;

    D.

    SELECT deptno, dname, loc

    FROM dept;

2 points   

QUESTION 7

  1. The student table contains the following columns:

    LAST_NAME VARCHAR2(25)

    FIRST_NAME     VARCHAR2(25)

    EMAIL      VARCHAR2(50)

    You are writing a SELECT statement to retrieve the names of students that do NOT have an e-mail address or e-mail address value is unknown.

    SELECT last_name || ', ' || first_name "Student Name"

    FROM   student;

    Which WHERE clause should you use to complete this statement?

    A.

    WHERE email = NULL;

    B.

    WHERE email != NULL;

    C.

    WHERE email IS NULL;

    D.

    WHERE email IS NOT NULL;

2 points   

QUESTION 8

  1. Which SELECT statement should you use if you want to display unique combinations of the POSITION and MANAGER values from the EMPLOYEE table?

    A.

    SELECT   position, manager DISTINCT

    FROM   employee;

    B.

    SELECT position, manager

    FROM   employee;

    C.

    SELECT DISTINCT position, manager

    FROM employee;

    D.

    SELECT position, DISTINCT manager

    FROM   employee;

Homework Answers

Answer #1

Question 5:

D.

SELECT "Previous Balance: " || prev_balance || " & Finance Charge: "

|| prev_balance * .009

FROM account;

Strings with spaces can be used with double quotes and concatenation operator ||

option A ,B and C are incorrect as double quotes are not used with strings with spaces.

Question 6:

A.

SELECT *

FROM dept;

Select * is used to display all columns.

Question 7:

C.

WHERE email IS NULL;

IS NULL is the correct option

8.

C.

SELECT DISTINCT position, manager

FROM employee;

Distinct keyword is used to display unique values without repeating.

Do ask if any doubt. Please upvote.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1) Add to a relational table DEPARTMENT information about the total number of employees in each...
1) Add to a relational table DEPARTMENT information about the total number of employees in each department. Note, that if a department has not employee then for such a department the total number of employees must be set to zero (0). The total number of employees must be a positive number no more than 999. Use SELECT statement to list the contents of an extended relational table DEPARTMENT in the descending order of the total number of employees. Finally, remove...
Write a SELECT statement that returns one row for each general ledger account number that contains...
Write a SELECT statement that returns one row for each general ledger account number that contains three columns: The account_description column from the General_Ledger_Accounts table The count of the items in the Invoice_Line_Items table that have the same account_number. The sum of the line_item_amount columns in the Invoice_Line_Items table that have the same account_number Return only those rows where the count of line items is greater than 1. This should return 10 rows. Group the result set by the account_description...
Create 2 stored procedures: sp_AddNewUser and sp_AddNewRole. Use the ManyToMany script as your base table structures....
Create 2 stored procedures: sp_AddNewUser and sp_AddNewRole. Use the ManyToMany script as your base table structures. The stored procedure should accept the parameters needed to input the data for each table. NOTE: You do not need to input the UserID or RoleID. These are surrogate keys and the system automatically inserts them when you insert a row in the tables.   On execution, the stored procedure should check the database to see if the user exists, if so, return a message...
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1....
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1. Write a SELECT statement that returns all columns from the Vendors table inner-joined with all columns from the Invoices table. 2. Write a SELECT statement that returns four columns: vendor_name vendor_name from the Vendors table invoice_number invoice_number from the Invoices table invoice_date invoice_date from the Invoices table balance_due invoice_total minus payment_total minus credit_total from the Invoices table The result set should have one row...
Which of the following is not to be extended to the statement of financial position columns...
Which of the following is not to be extended to the statement of financial position columns of the worksheet?                Select one: a. Accumulated Depreciation          b. Unearned Income c. Expired insurance premium d. Unused Supplies Which of the following is not an element in the computation of estimated depreciation expense? Select one: a. unpaid balance of the acquisition cost b. Acquisition cost                                c. Estimated useful life       d. Scrap value at the end of the useful life Using the liability method, the...
Space X Bank CREATE TABLE Branch(BranchIDNumber VARCHAR(15) PRIMARY KEY NOT NULL, BranchName VARCHAR(6) NOT NULL, Address...
Space X Bank CREATE TABLE Branch(BranchIDNumber VARCHAR(15) PRIMARY KEY NOT NULL, BranchName VARCHAR(6) NOT NULL, Address VARCHAR(50) NOT NULL, City TEXT NULL, State CHAR(2) NULL, ZipCode INT(11) NOT NULL, OfficeNum VARCHAR(15) NOT NULL, FaxNum VARCHAR(15) NOT NULL); CREATE TABLE Employee(EmployeeIDNumber VARCHAR(15) NOT NULL,FirstName VARCHAR(35) NOT NULL, LastName VARCHAR(35) NOT NULL, Email VARCHAR(100) NOT NULL, BranchIDNumber VARCHAR(11) NOT NULL, FOREIGN KEY(BranchIDNumber) REFERENCES Branch(BranchIDNumber), JobTitle ENUM("Manager","Staff") NOT NULL, Salary DECIMAL(8, 2) NOT NULL, HomeNumber VARCHAR(13) NULL, CellNumber VARCHAR(13) NOT NULL); CREATE TABLE...
For each account of the previous question, compute the Balance, and return a table that shows...
For each account of the previous question, compute the Balance, and return a table that shows the account number, type, and balance for each account (hint: use UNION). The list of customer names that have transactions greater than or equal to one thousand dollars. A) Answer this question using only nested queries (i.e., each select is over only one table). B) Answer this query using joins. Bank.sql is under this statement. DROP DATABASE IF EXISTS Bank; CREATE DATABASE Bank; USE...
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services...
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services a client to streamline the invoicing process at the end of the month. She does not want these records to affect any month or year to date financial reports throughout the month until she invoices the client. Which of the following transaction types do you recommend she uses to achieve this goal? A. Invoice B. Credit Memo C. Sales Receipt D. Delayed Charge E....
Complete a Java program named ARMgr that maintains customer accounts receivable in a database. The code...
Complete a Java program named ARMgr that maintains customer accounts receivable in a database. The code to initialize the CustomerAccountsDB database table and add a set of customer accounts is provided. Finish the code in these 3 methods in CustomerAccountDB.java to update or query the database: -purchase(double amountOfPurchase) -payment(double amountOfPayment) -getCustomerName() Hint: For getCustomerName(), look at the getAccountBalance() method to see an example of querying data from the database. For the purchase() and payment() methods, look at the addCustomerAccount() method...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT