Use the prime minister database

Assignment Help PL-SQL Programming
Reference no: EM13316169

Use the Prime Minister database (Prime_Minister_2013.sql) available from the Interact site. Answer the following queries using that database.

You are required to submit:

The appropriate SQL statements, which should be copied from your SQL code in MySQL, and 1. pasted into your submission file; and
Screenshots of the resultant tables which are to be pasted into your assignment file immediately 2. after the SQL code. Typing or manually drawing the results is NOT acceptable.

Write SQL SELECT statements to retrieve the following information from the Prime Minister database.

List the name, year commenced service as Prime Minister, party, state represented and the 1. name of the Deputy Prime Minister for each Prime Minister that served for less than 3 years. Order by the year they commenced service as Prime Minister in descending order.

2. List the name, party, recreation(s), name of their spouse and number of children of each Prime Minister of a Labor government who had four or more children and enjoyed outdoor sports.

3. List the name, the year that they commenced service as Prime Minister, the party they led and each Prime Minister of a Labor government. Order by the the year in which they left office of  year they commenced service and the Prime Minister's name.

Did any Deputy Prime Minister(s) subsequently become Prime Minister? List the Deputy 4. Prime Ministers name, the year that he/she commenced as Deputy Prime Minister, the year he/she commenced as Prime Minister and the party that they led. Order the list by name, year
commencing as Prime Minister and Party in descending order.

Attachment:- ASSIGNMENT.rar

Reference no: EM13316169

Questions Cloud

Electrical engineering design report - charger and inverter : Electrical Engineering Design Report about any topic prefer charger and inverter
Decrease in the number of stores accepting credit cards : The Federal Reserve was established in 1913 and is, therefore, a “creature of Congress.” The President of the United States nominates members of the Board of Governors of the Federal Reserve, subject to confirmation by the Senate. However, the Federa..
The distinctiveness of the organization : An organization that you know relatively well and attempt to construct a mission statement in light of the components of missions discussed in this chapter. What components did you choose to emphasize in the statement? Why? What component do you thin..
Determine the rise in temperature of the flowing water : A nuclear power plant has an electrical power output of 1067MW and operates with an efficiency of 45%. what is the rise in temperature of the flowing water
Use the prime minister database : Write SQL SELECT statements to retrieve the following information from the Prime Minister database.
What is the opportunity cost of taking the trip : You plan a major adventure trip for the summer. You won’t be able to take your usual summer job that pays $6,000, and you won’t be able to live at home for free.
What is the capacitance of this second capacitor : A 150 pF capacitor is charged to a potential difference of 64 V, and the charging battery is disconnected. what is the capacitance of this second capacitor
Compute the price elasticity of demand for the range : The new Millennium Dome Company (NMDC) must choose the entry fee for a new sports arena. Suppose an expensive consultancy firm has estimated the demand schedule to be as follows:
By how much does the first diver hit the water first : Two divers jump from a 5-m platform. One jumps upward at 1.90m/s , and the second steps off the platform as the first passes it on the way down. By how much does the first diver hit the water first (seconds)

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  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

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Write sql commands to implement profile

Write SQL commands which would implement this profile. Next, write query that would list profile, profile resource name, and limit value for the new profile.

  Write pl-sql block which displays last name

Write PL/SQL block which displays last name and salary of following people. Each of these can be done separately as PL/SQL, first to test and get output lines

  Perform the tasks below by using the correct sql statements

Create a view so that supplier 'ASP' can only see his information from the l_foods table.  Call this view_l_foods_ASP.  Show columns supplier_id, product_code, menu_item, description, and price in your view.

  How does the order of joins in an sql statement

How does the order of joins in an SQL statement affect the performance of the join and what can the DBA do to determine the preferred order of joins for an SQL statement that includes the join of at least three tables?

  Write a select statement that returns these columns

Write a SELECT statement that returns these columns from the Products table: The date_added column A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

  What is the expected profit for one month

Investigate the profitability that would result if instead of baking 30 batches each morning, they bake 25, 30, 35, or 40 batches. Which would you recommend and why? (You should use Decision Table with Crystal Ball, or Scenario Manager if plain Ex..

  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.

  Create a view named productsummary

Create a view named ProductSummary that uses the view you created in exercise 4. This view should return some summary information about each product.

  Write a pl/sql block and declare a variable v_sal

Write a PL/SQL block and declare a variable  v_sal  of the type NUMBER. Include the following statement in the Execution section:

  Script below to create an updateable

Use the script below to create an updateable view named balance_due_view. Then, create and test an INSTEAD OF trigger named invoices_instead_of_insert that lets the user update the columns in the view by directly updating the Invoices table.

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