Test No 1
Test No 1
GRADE-XII GRADE-XII
Date: 24/04/2024 DAILY TEST – 1 MARKS : 15 Date: 24/04/2024 DAILY TEST – 1 MARKS : 15
1. Create the following table item. (2) 1. Create the following table item. (2)
2. Insert the following information from table name item (2½) 2. Insert the following information from table name item (2½)
3. Write queries based upon item table given: (3) 3. Write queries based upon item table given: (3)
(a) Display all items information. (a) Display all items information.
(b) Display item name and price value. (b) Display item name and price value.
(c) Display item table information in ascending order based upon item name. (c) Display item table information in ascending order based upon item name.
(d) Display item name and price in descending order based upon price. (d) Display item name and price in descending order based upon price.
(e) Display item name, whose price is in between 50 to 100. (e) Display item name, whose price is in between 50 to 100.
(f) Add new column totalprice with number (10). (f) Add new column totalprice with number (10).
4. SELECT SUM (PRICE),MIN(PRICE),MAX(PRICE),COUNT(PRICE), 4. SELECT SUM (PRICE),MIN(PRICE),MAX(PRICE),COUNT(PRICE),
AVG (PRICE), COUNT (DISTINCT(PRICE) FROM ITEM; (3) AVG (PRICE), COUNT (DISTINCT(PRICE) FROM ITEM; (3)
5. Consider the table Projects given below. Write commands in SOL for 5. Consider the table Projects given below. Write commands in SOL for
i) to iii) and output for iv) (3½) i) to iii) and output for iv) (3½)
i. To display all information about projects of"Medium" ProjSize i. To display all information about projects of"Medium" ProjSize
ii. To list the ProjSize of projects whose ProjName ends with LITL. ii. To list the ProjSize of projects whose ProjName ends with LITL.
iii. To list ID, Name, Size, and Cost of all the projects in descending order of iii. To list ID, Name, Size, and Cost of all the projects in descending order of
StartDate. StartDate.
iv. SELECT DISTINCT ProjSize FROM projects. iv. SELECT DISTINCT ProjSize FROM projects.
6. i. Write MySql command will be used to open an already existing database 6. i. Write MySql command will be used to open an already existing database
"LIBRARY". (½) "LIBRARY". (½)
ii. Write one similarity and one difference between CHAR and
VARCHAR data types. (½)
ii. Write one similarity and one difference between CHAR and
VARCHAR data types.
(½)