0% found this document useful (0 votes)
21 views2 pages

Basic Questions of IP

Best question

Uploaded by

riteshyadavdbg7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Basic Questions of IP

Best question

Uploaded by

riteshyadavdbg7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Test – 2409

1
message = 'MyPreBoardExam@2024-25'
Write the output of: print (message[ : : -3].upper())

2. Gopi Krishna is using a table Employee .it has the following Columns:
Code, Name, Salary, Deptcode
He wants to display maximum salary for each department. Write the query to get
the result.

3. Write MySQL statements for the following:


i. To create a database named AUTOMOBILE.
ii. To create a table named VEHICLE based on the following specification:
ColumnName DataType Constraints
VehicleNumber INT Primary Key
VehicleName Char(40)
VehicleModel Char(50) UNIQUE

4. Consider the Table CLUB given below:


COACH_ID COACHNAME AGE SPORTS DATOFAPP PAY GENDER
1 KUKREJA 35 KARATE 1996-03-27 10000 M
2 RAVINA 34 KARATE 1997-01-20 12000 F
3 KARAN 34 SQUASH 1998-02-19 20000 M
4 TARUN 33 BASKETBALL 1998-01-01 15000 M
Answer the followings based on the above mysql table ‘CLUB’
i. Write sql query to display the average pay for karate coach
ii. Write sql query to display month for date of appointment ’DATEOFAPP
iii. Write sql query to display the details of male coach in ascending order of their
age.
iv. Write SQL query to display game wise maximum pay of all coaches.

5. Consider the following table TEACHER:


+-------+---------+------------------+-------+-----------------------
| TNo | TName | Dept | DOJ|
+-------+---------+-----------+-------+-----------------------
| 1 | Tanu | CS | 05.09.2007 |
| 2 | Sameer | MATHS | 10.09.2007|
| 3 | Vineet | PHYSICS | 19.09.2014|
| 4 | Sneh | BIO | 21.09.2014 |
| 5 | Akshit | CHEM |18.09.2021 |
+-------+---------+------------------+-------+------------------
Help her in writing SQL queries to perform the following task:
a) Insert a new record in the table having following values:
[6,'Abhinav','office', 12.10.2023]
b) To change the value “CS” to “Computer Science” in subject column.
c) To remove the records of those teachers who belongs to physics department.
d) To add a new column Salary of suitable datatype.
e) To display records of “CS” department.

6. Consider the SQL table "PRODUCT_SALES" with the following data:


| Product | Segment | Region | SalesQ1 | SalesQ2 |
| P1 | High | A | 25000 | 32000 |
| P2 | Medium | B | 18000 | 20000 |
| P3 | Low | A | 8000 | 9000 |
| P4 | High | C | 35000 | 38000 |
| P5 | Medium | B | 22000 | 25000 |
| P6 | Low | C | 5000 | 5500 |
Write suitable SQL queries for the following:
1. Display the region-wise average sales in the first quarter.
2. Display the segment-wise highest sales in the second quarter.
3. Display the records in descending order of sales in the second quarter.

7. Write a program to print all numbers between 1 and 100 that are either divisible
by 5 or 7.

You might also like