0% found this document useful (0 votes)
5 views3 pages

6628c13c1e50eMidTerm Spring2024

Uploaded by

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

6628c13c1e50eMidTerm Spring2024

Uploaded by

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

NAMAL UNIVERSITY MIANWALI

DEPARTMENT OF COMPUTER SCIENCE

Mid-Term Examination (Spring 2024)

Session: 2026 Semester: 4th ______


Course Code: CS-232 Course Name: Database Systems (Lab)__
Date: 24th May, 2024 Times Allowed: 90 Minutes__ ______
Total Marks: 25 Instructor’s Name: Ms. Asiya Batool____
Instructions:
1. Attempt all Questions.
2. Understanding questions is part of the exam.
3. All the required columns in the tasks should be displayed in output.
4. Use proper name for columns in the output.
5. Submit the document over QOBE in pdf format with file name in following format “db-mid-rollno”.
6. Late submission will not be accepted.
7. Cheating in any form will lead to 0 marks.

Name:
Roll No:

25 marks
Q1. Develop SQL queries for the following tasks. queries to the following task. The schema of
world database is given below. (CLO-3)
Task 1 Find all countries in Asia with a population between 100 million and 500 million.

Query

Output

Task 2 Find all cities where the name starts with "H" and ends with "d".

Query

Output

Task 3 Find all languages where the name starts with a vowel sorted alphabetically.

Query

Output

Show how many countries are found in each continent, displaying the continent with the most
Task 4
countries to the least?

Query

Output

Task 5 Find the top 3 most populous cities globally and their corresponding countries.

Query

Output

Task 6 Calculate the total population and number of cities for each continent.

Query

Output

Find the countries with at least 2 official languages (IsOfficial = 'T') and a total percentage of
Task 7
official languages exceeding 90%.

Query

Output

Calculate the average life expectancy across all countries and identify countries with a life
Task 8
expectancy below the average.

Query
GOOD LUCK

You might also like