Use the Prime Minister database (Prime_Minister_2013.sql) available from the Interact site. Answer t
Use the Prime Minister database (Prime_Minister_2013.sql) available from the Interact site. Answer t
Write SQL SELECT statements to retrieve the following information from the Prime Minister
database.
1. List the name, year commenced service as Prime Minister, party, state represented and the
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 (5 marks)
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. (5 marks)
3. List the name, the year that they commenced service as Prime Minister, the party they led and
the year in which they left office of each Prime Minister of a Labor government. Order by the
year they commenced service and the Prime Minister’s name. (5 marks)
Charles Sturt University Subject Outline
ITC114 201390 S I-29 October 2013-Version 1 Page 13 of 21
4. Did any Deputy Prime Minister(s) subsequently become Prime Minister? List the Deputy
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.(5 marks)
CREATE DATABASE IF NOT EXISTS `prime_minister_2013` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `prime_minister_2013`;
— MySQL dump 10.13 Distrib 5.6.11, for Win64 (x86_64)
—
— Host: localhost Database: prime_minister_2013
— ——————————————————
— Server version 5.6.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE=’+00:00′ */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’ */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
—
— Table structure for table `deputy_pm`
—
DROP TABLE IF EXISTS `deputy_pm`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deputy_pm` (
`min_nr` int(11) NOT NULL DEFAULT ‘0’,
`deputy_name` varchar(50) NOT NULL,
`party` varchar(50) DEFAULT NULL,
PRIMARY KEY (`min_nr`,`deputy_name`),
KEY `min_nr` (`min_nr`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
—
— Dumping data for table `deputy_pm`
—
LOCK TABLES `deputy_pm` WRITE;
/*!40000 ALTER TABLE `deputy_pm` DISABLE KEYS */;
INSERT INTO `deputy_pm` VALUES (1,’Deakin A’,’Protectionist’),(2,’Lyne W J’,’Protectionist’),(3,’Hughes W M’,’ALP’),(4,’McLean A’,’Protectionist’),(5,’Isaacs I A’,’Protectionist’),(6,’Hughes W M’,’ALP’),(7,’Cook J’,’Free Trade’),(8,’Hughes W M’,’ALP’),(9,’Forrest J’,’Liberal’),(10,’Hughes W M’,’ALP’),(11,’Tudor F G’,’ALP’),(12,’Pearce G F’,’National Labor’),(13,’Cook J’,’Nationalist’),(14,’Cook J’,’Nationalist’),(15,’Page C…
Attachments:
Is this the question you were looking for? If so, place your order here to get started!