0% found this document useful (0 votes)
8 views2 pages

Assignment 4

The document provides instructions for an assignment on subqueries, grouping, and aggregate functions. Students must write SQL queries to analyze flight and passenger data, with tasks covering subqueries, grouping, averages, and sorting. Submissions are due by the deadline on Moodle and will be graded based on correct results, use of subqueries, grouping, and aggregate functions.

Uploaded by

animkiyoko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Assignment 4

The document provides instructions for an assignment on subqueries, grouping, and aggregate functions. Students must write SQL queries to analyze flight and passenger data, with tasks covering subqueries, grouping, averages, and sorting. Submissions are due by the deadline on Moodle and will be graded based on correct results, use of subqueries, grouping, and aggregate functions.

Uploaded by

animkiyoko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ASSIGNMENT 4.

SUBQUERY, GROUPING, AGGREGATE FUNCTIONS

Submission: Due to deadline. Into Moodle LMS. Late submissions will result in point
deductions.
Submission format: Word or PDF document containing queries with screenshots that
cover the results of the queries.
• Utilize Subqueries, Grouping and Aggregate Functions in accordance with the task
requirements.
• Use shortcuts when using multiple tables.
• Use an alias for existing and derived columns.
• The expression should be formatted into a human-readable format.
• Defense of the assignment is mandatory. Failure to defend the assignment will result
in a grade of zero.

1) Write a query to find the number of flights arriving at each airport. (2 points)
2) What is the average flight delay time for each airline in the arrived schedule? (2
points)
3) Fine the first name and last name of each male passenger born between 1990 and
2000, along with the total baggage weight for each passenger. (4 points)
4) What is the total cost of tickets sold for each month in sorted way? (3 points)
5) Find the first name, last name, and number of security checks for passengers who
have undergone more than two security checks. (4 points)
6) What is the number of flights departing from each city excluding Chinese cities in
the alphabetic order? (3 points)
7) How many passengers have booked flights departing from airports located in
Poland? (4 points)
8) Find all overweight baggage (greater than 20 kg) for a passenger, along with the
particular security check results “Checked”. (4 points)
9) What is the average ticket price for each airline? (2 points)
10) How many boarding passes were issued to each passenger with printing fullname?
(2 points)
11) Show the amount of checked baggage, total baggage and what percentage of
baggage has passed security checks for each flight. (4 points)
12) Write query Identify the top 5 busiest airports based on the total number of
bookings. (3 points)
13) Find the average weight of checked baggage for each flight. Group the results by
the flight number. (3 points)

GRADING SYSTEM

Submission:
1 Correct Execution of the Task: Evaluates whether the queries 40%
produce accurate and expected results according to the task
requirements.
Defense:
2 Usage of Subqueries: Examines the student's ability to 20%
incorporate subqueries efficiently to achieve the desired
outcomes.
3 Grouping: Considers how well the student utilizes grouping 20%
techniques to organize and summarize data appropriately.
4 Aggregate Functions: Reflects the student's skill in applying 20%
aggregate functions to calculate summary statistics or metrics
accurately.
Total: 100%

You might also like