Who are the opposition leaders

Assignment Help PL-SQL Programming
Reference no: EM13338725

SQL Queries

Use the prime_minister database (prime_minister.sql) from the Interact Resources site. Answer the following queries from that database.

You are required to submit:

1. The appropriate SQL statements for each query, which should be copied from your SQL code in MySQL and pasted into your submission file;

2. Your SQL script, which is either for each question--one-step solution, or for the two sub-questions of each question-- two-step solution; and

3. Screenshots of the resultant tables which are to be pasted into your submission file immediately after the SQL code for that query. Typing or manually drawing the results is NOT acceptable.

NOTE:

1. Your SQL code should be correct for any data, not just any sample data that you create.
2. If your query results are contradict with the fact, please still present your answers based on the given prime_minister database.
3. The final query results by either one-step solution or two-step solution for each question should be the same.

Write SQL SELECT statements to retrieve the following information from the prime_minister database: Answer all questions

1. Find all Governors General of Australia who were Barons at the time of their appointment. List them by Title and name and date that they were appointed to the position. Order the list by ascending date of appointment. You can choose to answer this question in two steps:

a. Restrict your query to Governors General who were Barons at the time of their appointment

b. Then format the date of appointment as day of the week, day of the month, month and year; eg. Monday, 01 January, 1901. Order the list by ascending date of appointment.

2. Find all the Leaders of the Opposition and their date of appointment who gained their position after 01/01/1980, their wife's name and their date of marriage. Order the list by ascending date of appointment.

You can choose to answer this question in two steps:

a. list those who were the Leaders of the Opposition and their date of appointment who gained their position after 01/01/1980.

b. For each Leader of the Opposition listed as above, add their wife's name and their date of marriage. 

3. Who are the Leaders of the Opposition who were not members of a Labor party and who gained their position after 01/01/1980. List their name, date of election in the format month, day of week and year, eg: January 1st, 1980, spouse's name and their year of marriage. Order the list by ascending date of appointment.

You can choose to answer this question in two steps:

a. List whose who are the Leaders of the Opposition who were not members of a Labor party. Order the list by ascending date of appointment

b. Based on the result of Q.3a, list whose who gained their position after 01/01/1980. Order the list by ascending date of appointment 

4. List the title, name, date of appointment for Governors General of Australia who were appointed between 01 January 1930 and 01 January 1960, together with the Prime Ministers who appointed them and all Leaders of the Opposition who served during their appointment. The date is to be formatted in dd/mm/yyyy format. Order by ascending date of appointment.

You can choose to answer this question in two steps:

a. List the title, name, date of appointment for Governors General of Australia who were appointed between 01 January 1930 and 01 January 1960. Order by ascending date of appointment.

b. Together with the result of Q.4a, list the Prime Ministers who appointed them and all Leaders of the Opposition who served during their appointment. Order by ascending date of appointment. 

5. Who are the Opposition Leaders who subsequently became Prime Minister after 1930 ? List their name, the date they were elected Opposition Leader and the date they were elected Prime Minister and their Deputy Prime Minister's name and the party that they led. The dates must be formatted as day of the week, day of the month, month in digits and year in four digits; eg. Monday, 01/01/1901. Order the list by ascending date of appointment as Opposition Leader. 

6.. Who are the Prime Ministers who led a non-ALP party before 1930? List the Prime Ministers name, the year they commenced as Prime Minister, their party, their Deputy Prime Minister, the number of times that they were elected as Prime Minister and the title and name of the Governor General at the time they commenced office.

Reference no: EM13338725

Questions Cloud

What is the output : Suppose that x and y are int variables, z is a double variable, and ch is a char variable. Suppose the input statement is.
Calculate the total rotational kinetic energy of two hands : Big Ben, the Parliament tower clock in London, has an hour hand 2.70 m long with a mass of 300 kg, Calculate the total rotational kinetic energy of the two hands about the axis of rotation
What is the equilibrium risk premium : What is the equilibrium risk premium
What is the initial angular acceleration of the bridge : A uniform drawbridge must be held at a 35.0?angle above the horizontal to allow ships to pass underneath. what is the initial angular acceleration of the bridge
Who are the opposition leaders : Write SQL SELECT statements to retrieve the following information from the prime_minister database.
An investor be indifferent between these two bonds : 1)Corporate Bonds issued by ABC Corporation currently issued 12.1%. Municipal Bonds of equal risk currently yield 7.7%. At what tax rate would an investor be indifferent between these two bonds?
What are the other energy levels : A certain system emits electromagnetic radiation of wavelengths 'lambda'1=310nm, 'lambda'2=207nm and 'lambda'3=124nm. what are the other energy levels
How quickly is the water accelerating : When you put water in a kitchen blender, it begins to travel in a 3-cm-radius circle at a speed of 1 m/s. How quickly is the water accelerating
What is the acceleration of the three boxes : Three boxes are being accelerated on a horizontal table with a 60-N force applied to box 1 at an angle 35o below the horizontal. What is the acceleration of the three boxes

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  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

  Writing and execuinge sql command

The table name will be METALS and will be used to store description of various metals. Following offers some additional direction on how table must be created.

  Strengths and weaknesses of three dbms software

Research Report around 800 words strengths and weaknesses of three DBMS software packages for utilization as a company-wide customer information database. Please compare Microsoft Access, Microsoft SQL Server, and Oracle.

  What does each allow or restrict

Roles and Profiles are used by Oracle to define and control access and privileges of groups of users. Compare and contrast the concepts of role and profile.

  Explain entity integrity and referential integrity rules

Explain entity integrity and referential integrity rules in relational model.show how these aer realized in sql

  Create a clustered index on the groupid column

Write the CREATE INDEX statements to create a clustered index on the GroupID column and a nonclustered index on the IndividuallD column of the GroupMembership table.

  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.

  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.

  Give me a list of all the proposed prices

Give me a list of all the proposed prices for the next year from the l_foods table.  Sort your results by proposed_price.  (Note that proposed price, is price + price_increase.)

  Populate the tables with test data

Credit will be given to queries that are not trivial, for example, "SELECT * FROM Tablename" is unlikely to gain more than one mark. SQL Developer can be used to produce the queries and populate the tables.

  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.

  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."

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