COMP238-Lab-Manual-6 - 34002 Assignment 2
COMP238-Lab-Manual-6 - 34002 Assignment 2
OBJECTIVE:
The objective of this lab session is to learn Set operations Union, intersection, Except
and Aggregate Functions
Create this table Bikes and insert 5 Create this table Cars and insert 5
records records
Task 1
1. Find union of car and owner_name
from both tables SELECT car AS vehicle, owner_name FROM
cars
UNION
SELECT bikes AS vehicle, owner_name FROM
bikes;
Task 2
1.Show only 1st row of table bikes
Task 3
1. Show the Count of total numbers of
records in table cars
SELECT COUNT(*) FROM cars;
2. Count total numbers of records in
table bikes SELECT COUNT(*) FROM bikes;
Task 4
1. Show maximum year in bikes
=====================================================================================