Preview

Unit 53 Final Paper

Good Essays
Open Document
Open Document
383 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Unit 53 Final Paper
Overview This practice provides a variety of exercises using different functions that are available for character, number, and date data type.

Task Write the appropriate SQL statement for the following queries. (Using EMPLOYEES table)

1. Write a query to display the system date. Label the column as Date.

SELECT sysdate "Date"
FROM dual;

2. The HR department needs a report to display the employee number, last name, salary, and salary increased by 15.5%
(expressed as a whole number) for each employee. Label the column New Salary.

SELECT employee_id, last_name, salary,
ROUND (salary * 1.155, 0) "New Salary"
FROM employees;

3. Modify your query in Task 2 to add a column that subtracts the old salary from the new salary. Label
…show more content…

Write a query that displays the last name (with the first letter in uppercase and all other letters in lowercase) and the length of the last name for all employees whose name starts with the letters “J”, “A”, or “M.” Give each column an appropriate label. Sort the results by the employee’s last names.

SELECT INITCAP(last_name) "Name",
LENGTH(last_name) "Length"
FROM employees
WHERE last_name LIKE 'J%'
OR last_name LIKE 'M%'
OR last_name LIKE 'A%'
ORDER BY last_name ;

5. Create a query to display the last name and salary for all employees. Format the salary to be 15 characters long, left-padded with the $ symbol. Label the column as SALARY.

SELECT last_name,
LPAD(salary, 15, '$') SALARY
FROM employees;

6. Create a query that displays the first eight characters of the employees’ last names and indicate the amount of their salaries with asterisks. Each asterisk signifies a thousand dollars. Sort the data in descending order of salary. Label the column as EMPLOYEES_AND_THEIR_SALARIES.

SELECT substr(last_name, 1,8)||’


You May Also Find These Documents Helpful

  • Powerful Essays

    Wacct 505 Week 9 Final Paper

    • 3289 Words
    • 14 Pages

    Objective: This course is designed to provide you with a general understanding of a variety of financial restructuring and reorganization techniques. Each topic that we discuss describes a transaction that restructures or reorganizes the firm in some particular way. The specific objectives of the course include: (1) to help build a framework for analyzing various corporate restructuring transactions primarily through techniques of financial analysis; (2) to provide a…

    • 3289 Words
    • 14 Pages
    Powerful Essays
  • Satisfactory Essays

    Unit 9 Paper

    • 611 Words
    • 3 Pages

    * Theresa Metzger appeals from an order entered by the Superior Court of Clayton County granting partial summary judgment to Americredit Financial Services, Inc. on her claim for conversion based on the alleged wrongful repossession of her vehicle. Metzger contends that the superior court erred by failing to conclude that she took her vehicle free of Americredit's security interest under the special good faith purchaser rule for goods covered by a certificate of title set forth in OCGA § 11-9-337(1). We agree and reverse.…

    • 611 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    SET ServerOutput on > By default, SQL*Plus doesn’t display output from PL/SQL, execute this command can unblock this function…

    • 193 Words
    • 1 Page
    Good Essays
  • Better Essays

    Purpose: to add name of sales person and also functionality to manage the list of sales persons an comparing their annual compensation…

    • 761 Words
    • 4 Pages
    Better Essays
  • Satisfactory Essays

    Hiredate DATE No No Job VARCHAR2(15) No No Mgrno number(4) no no yes ( to emp.empno) Salary number(8,2) no no Comm number(8,2) no no Deptno number(2) no no yes ( to…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    2. With the Customers table sorted in alphabetical order by city, what is the name of the first customer to appear in the table?…

    • 314 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CTS 2437 Final Exam

    • 630 Words
    • 4 Pages

    5. Create a view that includes the first and last names of full time faculty members, along with…

    • 630 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    BMIS 325 Phase II Part A: Table Creation and Data Loading Part B: Reports 1.) Human Resources: Select Regions. RegionName, Countries. CountryName, concat(Employees. LastName, ', ' ,Employees.…

    • 485 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Unit 201 Err

    • 794 Words
    • 4 Pages

    My salary should be shown and the hours which I have worked, Also the rate of my pay for example 433.3300. Also the date of the payslip, the tax code and employee number, The net pay and also my name. Total gross pay, Gross for tax, Tax paid, Earnings for National Insurance and also My National Insurance number.…

    • 794 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    ( NAME = N'Jeff Thompson Sr - POS 410 - IA - KVO_log', FILENAME = N'D:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Jeff Thompson Sr - POS 410 - IA - KVO_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)…

    • 1555 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    cheat sheet

    • 1430 Words
    • 6 Pages

    3. Find all employees who live in the same city and street as their manager (3 pts)…

    • 1430 Words
    • 6 Pages
    Powerful Essays
  • Best Essays

    Emotional development is important for a child as it plays essential roles in the functioning and wiring of the brain within the first few years of life. The right emotional attachments formed by a parent or caregiver can influence how a child interacts with others as well as how the child copes with stress and adversity. The need for secure attachment in a child’s life serves as a type of mental molding which helps with positive growth and expectations in the confident adult life. Secure parental relationships at an early age lay the blueprint for an adult who is able to create and maintain…

    • 2948 Words
    • 12 Pages
    Best Essays
  • Good Essays

    BIS 155 Final

    • 2158 Words
    • 9 Pages

    Explain how you will structure and format your worksheet, including titles, column headings, and formulas to calculate payroll variables for each employee to determine "Net Pay" including and not limited to Total Hours, Gross Pay, Social Security Tax, Federal Withholding Tax, and Sate Withholding Tax. In addition, determine how you would extract overtime hours from a calculated value of "Total Hours" using a conditional formula.…

    • 2158 Words
    • 9 Pages
    Good Essays
  • Satisfactory Essays

    Chapter 1 Level 1

    • 689 Words
    • 3 Pages

    Name the Employee and Customer tables according to their contents and the Leszynski/Reddick naming conventions.…

    • 689 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Employees; who work for the company, their position and word pay are related to the company.…

    • 75 Words
    • 1 Page
    Satisfactory Essays