Ask Question, Ask an Expert


Ask PL-SQL Expert

Plane_new table

PNUM             FEATURE                     PTYPE
---                 --------------------               ---------------
p01                   Regular                      Normal
p02                   Multiple_en                Commuter
p03                   Propeller                    Commuter
p04                   Single_en                   Very_light
p05                   Singel_en                   Very_light
p06                   Multiple_en                Commuter
p07                   Regular                      Normal
p08                   Wildlife                       Restricted
p09                   Multiple_en                Commuter
p10                   Regular                      Normal

Employee_new table

EID              NAME          SALARY             MID
---            -------------        -------                 -----
e01            Wilson           53000
e02            Smith             48000              e01
e03            Jones             38000              e01
e04            Loftus            41000
e05            Wang            54000               e04
e06            Smith             45000               e04
e07            Green            48000
e08            Fox                49000               e04
e09            Wolf               41000               e04
e10            Fox                32000                e01
e11            Phillips           33000                e07
e12            Liu                 27000                e07

Pilot_new table

EID                           LICENCE
---                             ---------
e01                           123456789
e02                           234567891
e03                           345678912
e04                           456789012
e05                           567891234
e06                           678912345
e08                           890123456
e09                           901223456
e10                           102345678

FlightI_new table

FNUM                FDATE       DURATION        PID           PNU
----                  ----------          ----------          ---               ---
f01                  09-SEP-11          2                e01             p01
f02                  30-Sep-11          3                e02             p02
f03                  15-OCT-11         4                e02             p03
f04                  15-OCT-11         3                e03             p01
f05                  25-OCT-11         2                e04             p04
f06                  26-OCT-11         3                e05             p04
f07                  26-OCT-11         4                e06             p05
f08                  30-OCT-11         3                e06             p07
f09                  31-OCT-11         2                e08             p09
f10                  31-OCT-11         1                e02             p01
f11                  01-NOV-11        4                e09             p10
f12                  02-NOV-11        3                e01             p03
f13                  02-NOV-11        4                e02             p04
f14                  15-NOV-11        2                e03             p02
f15                  15-NOV-11        2                e02             p03

Use SELECT command to display the contents of your tables.

Develop SQL statements for the given queries:

problem: List the names of pilots implementing flights on the planes of Normal type.

problem: List out plane registration numbers and features for planes which have been employed to implement more than one flight after October 15, 2011

problem: Determine and display all pilots (names only) who didnt implement a flight after October 31, 2011.

problem: For each and every plane display its plane number and the total number of hours spent in the air. Comprise planes which were not used at all. For such planes, leave the total number of hours blank.

problem: Find the name(s) of pilot(s) who implemented the longest flight.

problem: Find out the names of senior pilots (managers) whose pilots implemented flights on the planes of type Very_light.

problem: Find and exhibit all pilots (employee ID and name) who implemented flights on the planes of Commuter type and Normal type.

problem: For each and every flight, display its number, the name of the pilot who implemented the flight and the words Longer than average if the flight duration was longer than average or the words Shorter than average if the flight duration was shorter than or equivalent to the average. For column holding the words Longer than average or Shorter than average make a header Length.

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M9240

Have any Question? 

Related Questions in PL-SQL

Write the sql select statement to display the average rent

Write the SQL SELECT statement to display the average rent of the properties. Use the following PROPERTY table to answer the question: PropertyID Type Rooms Rent 306 Apt 3 550 308 House 6 1000 325 Apt 4 625 397 Apt 3 550 ...

Movie theater database sql commandswrite the sql data

Movie Theater Database: SQL Commands Write the SQL Data Definition Language (DDL) commands to create the movie theater database based upon the below Entity Relationship Model (ERM). Be sure to include commands to create ...

Projectcomplete the following queries using hr schema

Project Complete the following queries using HR Schema. Submit your answer in the form of a SQL text file to the Final Project Dropbox. 1. Show first name, last name, start date and end date for all employees. The dates ...

Assignment- relational database design amp

Assignment- Relational Database Design & Implementation Important Note: You are required to submit an electronic copy to ilearn as well as a hard copy of your assignment to the assignment box allocated in the ground floo ...

Database assignment 11 using heritage data release 1 in

Database Assignment 1: 1. Using heritage data (release 1) in SQL a. Find support for all single itemsets b. List all itemsets with 2 elements and support of at least 0.2 c. List all itemsets with 3 elements and support a ...

Assignmentthe following data model is designed to hold

Assignment The following data model is designed to hold information relating to Students, Student Courses and Tutors who deal with these students. For this scenario we need to define the following facts: The Entities req ...

Given the relations below create the database tables using

Given the relations below, create the database tables using SQL DDL (Data Definition Language). Assume the following attribute data types: STUDENT (StudentID, StudentName) StudentID StudentName 38214 Alvaro 54907 Letterm ...

Sql assignmentwrite 10 sql statements against the student

SQL Assignment Write 10 SQL statements against the STUDENT schema you created for practice lab 1. Your statements should run error-free and should be valid. Submit two separate files: one plain text file (.txt or .sql fi ...

Writing sql statements1 for each movie category show the

Writing SQL statements. 1. For each movie category, show the number of movies in the database of that category, the total number (sum) of nominations (NOMS) and the average length of that type. Include only those categor ...

Assignmentwrite sql queries for the books database

Assignment Write SQL queries for the books database (discussed in Section 18.3) that perform each of the following tasks: a) Select all authors from the Authors table with the columns in the order lastName, firstName and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro