PT TEST-1 A2
PT TEST-1 A2
10. Write the outputs of the SQL queries (i) to (iii) based on the relations car and customer give below
R.Ccode=C.Ccode:
12. Write the SQL commands for the following questions (i) to (v) based on the
(i) To display the Names and Charges of all the Silver coloured cars.
(ii) To display the non duplicate car codes in the customer table.
(iv) To give a discount of 10% in the car charges for existing customers (who
(v) To display Name and Make of cars whose charges is in the range 2000
13. A Book store Current Books is planning to store their book details in a database using SQL. As a
database administrator, Poorvekka has decided that: (4)
(a) Name of the database – CB
(b) Name of the table - Collections
(c) The attributes of Collections are as follows:
BookNo - Numeric
BookName – Character of size 25
Price – Numeric
Quantity – Numeric
I) Identify the attribute best suitable to be declared as a primary key,
14. Consider the following tables FACULTY and COURSES. Write SQL commands for the statements
(1) to (4) and give outputs for SQL queries (5) to (6). (6)
i) To display all the details of those watches whose name ends with ‘Time’
ii) To display watch’s name and price of those watches which have price range in between 5000-
15000.
iii) To display total quantity in store of Unisex type watches.
iv) To display watch name and their quantity sold in first quarter.
v) select max(price), min(qty_store) from watches;
vi) select quarter, sum(qty_sold) from sale group by quarter;
vii) select watch_name,price,type from watches w, sale s where w.watchid!=s.watchid;