Page 21 - IPP-12-2025
P. 21
Ans. (a) Create table VEHICLES
(
VehicleID int Primary Key,
Make varchar(50),
Model varchar(35),
Year int,
Price int
);
(b) Insert into VEHICLES values(101,'Toyota','Honda', 2022, 4800000);
32. Consider the following tables: [3]
Table 1:
MOBILE, which stores Mobile ID (M_ID), Mobile Brand (BRAND), Model (MODEL) and Release Year
(RELEASE_YEAR).
Table 2:
USAGE_HISTORY, which stores Mobile ID (M_ID), Usage Type (USAGE_TYPE) and Usage Time
(USAGE_TIME).
Note: Attribute names are written within brackets.
Table: MOBILE
M_ID BRAND MODEL RELEASE_YEAR
M1001 Samsung Galaxy S21 2021
M1002 Apple iPhone 13 2021
M1003 OnePlus 9 Pro 2020
M1004 Xiaomi Mi 11 2022
M1005 Oppo F19 Pro 2021
Table: USAGE_HISTORY
M_ID USAGE_TYPE USAGE_TIME
M1001 Calling 150 mins
M1102 Browsing 120 mins
M1003 Gaming 200 mins
M1004 Calling 180 mins
M1005 Social Media 90 mins
Write appropriate SQL queries for the following:
(a) Display the list of mobile brands that were released after the year 2020.
(b) Display the mobile model names along with their usage type.
(c) Display the total usage time for each mobile.
Or
Consider the following tables:
Table 1:
EMPLOYEES, which stores Employee_ID, Employee_Name, Age, Department_ID. The table displays basic
information about employees.
Table 2:
DEPARTMENTS, which stores Department_ID and Department_Name. The table displays information
about departments.
Table: EMPLOYEES
Employee_ID Employee_Name Age Department_ID
E1101 Rakesh Bansal 30 D0001
E1102 Sanchit Sharma 28 D0002
E1103 Anisha Kapoor 35 D0003
E1104 Dhrisha Mehta 26 D0001
Model Test Paper M.18
37