Prepare sql queries to find the customers

Assignment Help PL-SQL Programming
Reference no: EM13712133

Write the given queries in SQL (no top, rank, limit, or windows allowed)

Customer (cid, name, address)

Car (vin, make, color, number-doors, daily-price)

Reservation (cid, vin, date, location, number-days)

Customer contains the customer id (the key), name and address of each customer who rents a car. Car contains information about vehicles: the vin (key), the make, color, number of doors (either 2 or 4), and the daily price to rent the car.

Reservations registers each reservation, who reserved the car, which car was reserved, the location where the car was rented, the date the reservation starts, and the number of days it lasts.

Each customer may make several reservations and each car can be reserved several times.

Note that we assume no two reservations of the same car or by the same customer on the same day. Suppose date has both month and year, as in March 2009.

Write the given queries in SQL (no top, rank, limit, or windows allowed)

Part 1- List the names of customers who have reserved a green car during September 2013.

Part 2- Give the number of reservations each month during all of 2010.

Part 3- Find the number of reservations involving Ford cars in a location other than Detroit.

Part 4- Find out customers who made more than 12 reservations in 2010.

Part 5- List the longest reservations (the ones with the most number-days) in the whole database.

Part 6- List the reservations with duration (number-days) larger than the average duration.

Part 7- List the car makes that have the most days in total reservations in 2010.

Part 8- Find the customer's who have reserved only 4-door cars.

Prepare SQL queries to find the customers who have reserved only 4-door cars.

Reference no: EM13712133

Questions Cloud

Is the spring free exerted on mass : is the spring free exerted on mass 1 while it rotates greater than, less than, or equal to the force exerted by the spring on a stationary mass 1 with the spring stretched the same amount (to the radius marker).
Write recursive and iterative versions of functions : Write recursive and iterative versions of functions that compute the sum of components of an array.
Plot two different voltage vs. time graphs : Plot two different Voltage vs. time graphs depicting input voltages that would cause DC to flow through in a circuit. Plot two different Voltage vs. time graphs depicting input voltages that would cause AC to flow through in a circuit
Write an iterative version and a recursive version : Write a main program that illustrates the work of your functions. E.g., if a[ ]={1,2,3,3,4,5} then 3 occurs 2 times and 7 occurs 0 times.
Prepare sql queries to find the customers : Prepare SQL queries to find the customers who have reserved only 4-door cars.
Calculate the acceleration of the bucket : Calculate the acceleration of the bucket. Calculate how fast the bucket is moving after it has fallen 2.50 m assuming it has not reached the edge of the building.
Write a program to find minimum and maximum values : Write a program to find minimum and maximum values for third-degree polynomials of the form:
Determine order of operations for seq search algorithm : Determine the order of operations for this Seq Search algorithm. Best case and worse case and why - Find the order of operations for this Search algorithm. Prepare a proper algorithm for this problem and how to complete it.
What is the y-component of the electric field : What is the x-component of the electric field at the point. What is the y-component of the electric field at the point. What is the total magnitude of the electric field at the point.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  In this problem we will consider a movie database with

in this problem we will consider a movie database with three tablesmoviedirectortitle director yearmoviecasttitle actor

  Calculate days between ordering and shipping

Calculate the Tax on an Order, Calculate the Total Shopper Spending - Develop a SELECT statement using the BB_SHOPPER table to produce a list of each shopper in the database and his or her respective totals.

  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.

  Write a select statement

Write a Select statement that determines whether the PaymentDate column of The Invoices table has any invalid values.

  Select distinct cmdclient

SELECT DISTINCT CMDclient.'Client Code SCA' as GuestCode, CMDextras.ArrivalDate as arr, CMDextras.DepartureDate as dep, CMDapr.FirstName as fname, CMDapr.Surname as lname

  Create a database model

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

  Review problem and run required statement to create table

Please note that for "Table Employees" due to length of the table description and page size limit, I have broken it into 2 parts for better visibility, please make sure to use all the given attributes from the table.

  Create a plsql block to achieve the following using the hr

create a plsql block to achieve the following using the hr schemaselect the name salary and department of the employee

  How primary and foreign-key relationships are applied

At this point, you will add data to your database and validate that they loaded properly. In tabular format, include 3 rows for each table, making sure that the primary-key and foreign-key relationships are properly applied.

  Sql statement which select names and owners of great danes

Write SQL statement which would select each of the following: names and owners of all Great Danes and all attributes of poodles whose balance is no greater than $50.

  F does not logically imply

Given R = (J,K,L ) and the set F of FDs J -> K and L -> K , show that F does NOT logically

  Describe concepts of database-orientated programming

describe concepts of database-orientated programming language plsql as well as of data analysis techniques for

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