Assignment of sql queries

Assignment Help PL-SQL Programming
Reference no: EM13727320

1504_s7.png

Based On above MS access model answer the following SQL query questions.

Question 1: Design a query to find out details of CustomerNo, first name , last name who have paid amount more than the average amount paid by all customers.

Question 2: The Garage centre is interested in knowing details of Ford cars which have come for more than two times for servicing. Design a query to display the requested details.

PART 2

Build the above model in MS SQL server (Refer question 1 below under design SQL queries:). Choose appropriate data types for each attribute carefully. Choose PK and FK as shown in the above structure. Populate tables with appropriate data. In each table at least 10 records are required to be entered.

Question 1: Use CREATE statement to build EMPLOYEE, CUSTOMER, CAR, SERVICE tables in MS SQL Server. Rest of the tables can be built by using GUI tools.

Question 2: Use INSERT statement to enter sufficient number (minimum 10) of records into these tables.

Question 3: "Alter" EMPLOYEE table to add a field called Mobile. Choose appropriate data type.

Question 4: Design a SELECT statement to display EmployeeNo, first name and date of birth. The date of birth must be in the year 1990. The employee last name should start with letter "K". All duplicate records must be eliminated.

Question 5: The Management needs listing of employees by last name and first name. The first name should be displayed in capital letters. The entire name should be joined together to display in a single column with a heading "Employee Name". The last and first name should be separated by a comma. The name should start with first name.

Question 6: Employees working in accounts department need restricted access to employee information. Create a view named LimitedEmpl_view that includes only EmployeeNo, First Name , Last Name, HomePhone. The view should have more meaningful names (for the fields) than given in the table / s. The first and last names should be combined to display (Eg: Chandra, N) as EmployeeName & CAST as CHAR(25) . Write a select statement on the view so that employee numbers less than 400 are displayed.

Question 7: Drop LimitedEmpl_view from the database.

Question 8: The management is interested in knowing when a employee is reaching 30 years so that they can send them additional info for certain courses. Display details of EmployeeNo, Employee First Name and employee last name.

Reference no: EM13727320

Questions Cloud

Explain what is the purpose of environmental scanning : What is the purpose of environmental scanning. List internal and external environmental factors. How do internal and external factors affect the four functions of management
Determine the number of deliveries needed weekly : Discuss how you would: Select a Meat Purveyor; determine the Number of Deliveries needed weekly
Explain what are the current capacity utilizations : Analyze the capacity situation in the processes that are used to produce the Plasti-brack product line. What are the current capacity utilizations. What is the bottleneck. Determine an appropriate plan for improving the capacity situation.
Calculate an average return : You calculate an average return of 10% and a standard deviation of 5%. Assuming the returns are normally distributed, what is the probability that the investment will yield a return of less than 5%?
Assignment of sql queries : Design a query to find out details of CustomerNo, first name , last name who have paid amount more than the average amount paid by all customers.
Provide a detailed cost breakdown : The present labor force can produce 500 units per month. Each employee added can produce an additional 20 units per month and is paid $1000 per month. The cost of materials is $30 per unit. Overtime can be used at the usual premium of time and a h..
What is your total return on this investment : One year ago, you purchased 300 shares of Sith Brothers, Inc., at $51.64 a share. The stock paid a total of $660 in dividends during the year. Today, you sold your shares for $52.08 share. What is your total return on this investment?
Explain what you learned from reading the section : Team assignment: each member of the team must read the attached 7-page article "Escaping the Marketing Morass" about the " jobs-to-be-done" framework, explain what you learned from reading the section
Baldrige center of excellence evaluation : You are the C.E.O. of Community South Medical Center, a large, urban for-profit healthcare facility. This institution has comprehensive health services including acute care, residential care, independent living, in-home nursing, hospice, neonatal..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  The cast function to return the date added column

A column that uses the CAST function to return the DateAdded column with its full time only (hour, minutes, seconds, and milliseconds)

  Sql script-creating the database and inserting data

Understanding the SQL script, creating the database and inserting data and display all product information for products that contain the string ‘saw' in their description.

  Write a perl subroutine for temperature conversion

Write a perl subroutine for temperature conversion named 'convert_temp'. It should be able to handle both Fahrenheit to Celsius conversions as well as Celsius to Fahrenheit conversions.

  Sql statements to create tables using sql ddl statements

Write SQL statements to create the above tables using SQL DDL statements. Write an INSERT statement to add two new records to each table.

  Write select statement to return those rows with due balance

Write SELECT statement which returns those rows with the balance due greater than 1000. Sort result set by InvoiceTotal, with largest invoice first.

  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.

  An er diagram for the system

An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

  What could the mds that violate 4nf be

Let's define the rating of a director to be the average rating of all his/her movies. Find the names and ratings of all directors who have directed movies starring Al Pacino.

  Display all the lastnames from the customers table

Display all the LastNames from the Customers table and any associated OrdersIDs from the Orders Table. Show the LastName even if they do not have any associated orders. Order the results by LastName in ascending order.

  Write sql statement to create stored procedure

Write SQL statement which creates stored procedure with one int input parameter. The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table.

  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

  Analyse er diagram and database schema

Display the structure details for which the smallest total billable activity (time) has been performed in the last month - Display details of all employees (number, name) for whom billingrecords have been created when they are not identified as havi..

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