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

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  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.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  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

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