Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
67% found this document useful (3 votes)
8K views

Lab Exercise of Class 11 IP Mysql

This document contains instructions for two lab exercises involving SQL queries. The first exercise involves 13 queries on a table of people, retrieving and manipulating name, ID, address, city, and contribution column values. The second exercise involves 7 queries on a table of items, retrieving and manipulating item name, ID, price, purchase date and day of week values. The document provides sample output to demonstrate the expected results of each query.

Uploaded by

Jyoti Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
8K views

Lab Exercise of Class 11 IP Mysql

This document contains instructions for two lab exercises involving SQL queries. The first exercise involves 13 queries on a table of people, retrieving and manipulating name, ID, address, city, and contribution column values. The second exercise involves 7 queries on a table of items, retrieving and manipulating item name, ID, price, purchase date and day of week values. The document provides sample output to demonstrate the expected results of each query.

Uploaded by

Jyoti Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

LAB EXERCISE-1

QUESTIONS

1.Display all Firstnames in lowercase.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 1
2.Display all lastname of people of Mumbai city in Uppercase.

3.Display person id along with first 3 characters of his/her name.

4.Display frstname concrated with lastname for all the employees.

5.Display length of address along with person ID.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 2
6.Display last 2 charcaters of city and person ID.

7.Display last names and firstname of people who have “at ”in the second or third position in their
firstnames.

8.Display the position of ‘a’ in lastname in every row.

9.Display lastname and firstname of people who have “a” as the last character in their firstname.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 3
10.Display the firstname and lastname concatenated after removing the leading and trailing blanks.

11.Display person id, last name and contribution rounded to the nearest rupee of all persons.

12. Display person id, last name and contribution with decimal digit truncated of all the persons.

13.Display lastname,contribution and a third column which has contribution divided by 10.round it two
decimal points.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 4
LAB EXERCISE-2

1.Display item name,unitprice along with date of purchase for all the items.

2.Display itemname along with month when it was purchased for all the items.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 5
3.Display item name along with year In which it was purchased for all the items.

4.Display itemid,date of purchase and dayname of week on which it was purchased for all items.

5.Display the day name of the week on which rice was purchased.

6.Display the item name and unit price truncated to integer value of all the items.

7.Display current date.

NAME.KARTIK
CLASS.11S
INFORMATICS PRACTICES Page 6

You might also like