Computer Science Homework Solutions
Problem
#144058

Queries

Using the attached database WK5_DB_ACCESS2000.mdb write SQL queries to answer the following questions.

7. Show the employee (by name) that is shortest.

8. Determine the average number of years that the average employee has been working.

    Hint: here's how to get started:

        SELECT (Now()-[HIRE_DATE])/365 AS YEARS
        FROM EMPLOYEES;

9. Count how many employees have blue eyes and are married.

10. Write the SQL to answer this question: which employees have the same letter starting their first name as their last name (every employee actually meets this criteria, but pretend you didn't know that and write the SQL to figure this out.)

    Hint: the Left() function will be helpful. For example: SELECT  Left([L_NAME],1)

11. Answer this question using SQL: show which eye color is most dominant in the employees (its Brown, with a count of 4 employees) - in other words, show the eye colors by count but only show the max value of count (4).

Attached file(s):
Attachments
WK5_DB_ACCESS2000.mdb  View File
Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$7.98)
Included in Download
  • Plain text response
  • Attached file(s):
    • Using the attached database WK5.doc
    • WK5_DB_ACCESS2000.mdb
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Access Database Problem - Create a database for a human resources group. List a few different tables and colums to store the HR information. State assumptions in creating the DB and underlying database objects. Use Access t ...
  • MS SQL STATEMENT PROBLEMS - I am using Microsoft SQL Server 2000 1. Database Tables TABLE: Employees Job_title_code Social_security_number Last_name First_name Address City State Zip_code Telephone_ar ...
  • Microsoft SQL STATEMENTS - I am using Microsoft SQL Server 2000 1. Database Tables TABLE: Employees Job_title_code Social_security_number Last_name First_name Address City Sta ...
  • MS SQL STATEMENTS - I am using Microsoft SQL Server 2000 1. Database Tables TABLE: Employees Job_title_code Social_security_number Last_name First_name Address City Sta ...
  • SQL Statements To Run In SQl Server - write SQL queries using Between, Like and Union: • Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use salary to restrict the d ...
Browse