





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Study material for exams[IP] paper
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






General Instructions:
Hub ii. Modem iii. Gateway iv. Repeater Hydrogen ii. (^) Beryllium iii. Chlorine iv. Oxygen Intellectual Property Right ii. (^) Individual Property Right iii. Industrial Property Right iv. International Property Right 0 ii. NULL iii. NaN iv. 9
ii. (^) ROUND() iii. LENGTH() iv. MOD() Libre Office ii. Mozilla Firefox iii. Google Chrome iv. Python Column Separated Value ii. (^) Class Separated Value iii. Comma Separated Value iv. Comma Segregated Value DEPT, AVG(SAL)^ FROM^ EMP^ WHERE^ COUNT()^ >^5 GROUP BY DEPT; Which of the following is a correct query to perform the given task? i. SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT() > 5 GROUP BY DEPT; ii. SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT() > 5 GROUP BY DEPT; iii. (^) SELECT (^) DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT() > 5; iv. SELECT (^) DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT(*) > 5; May ii. March iii. may iv. march
Creative Cost ii. Critical Commons iii. Creative Commons iv. Creative Common Both A and R are true and R is the correct explanation for A ii. (^) Both A and R are true and R is not the correct explanation for A iii. A is True but R is False iv. A is false but R is True Both A and R are true and R is the correct explanation for A ii. (^) Both A and R are true and R is not the correct explanation for A iii. A is True but R is False iv. A is false but R is True Returns the position of the first occurrence of the substring “the” in the given string. ii. (^) To extract last five characters from the string.
| FUEL | QT1 | QT2 | +--------+-------------------+--------+-------+-------+ | 1 | Compact HatchBack | Petrol | 56000 | 70000 | | 2 | Compact HatchBack | Diesel | 34000 | 40000 | | 3 | MUV | Petrol | 33000 | 35000 | | 4 | MUV | Diesel | 14000 | 15000 | | 5 | SUV | Petrol | 27000 | 54000 | | 6 | SUV | Diesel | 18000 | 30000 | | 7 | Sedan | Petrol | 8000 | 10000 | | 8 | Sedan | Diesel | 1000 | 5000 | +--------+-------------------+--------+-------+-------+ i. (^) Display fuel wise average sales in the first quarter. ii. (^) Display segment wise highest sales in the second quarter. iii. Display the records in the descending order of sales in the second quarter. OR Predict the output of the following queries based on the table CAR_SALES given above: i. SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL= "PETROL"; ii.SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE SEGMENT= "SUV"; iii. SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL= "DIESEL";
Write a query to display the year of oldest transaction. ii. (^) Write a query to display the month of most recent transaction. iii. Write a query to display all the transactions done in the month of May. iv. Write a query to count total number of transactions in the year 2022. Store Qtr1 Qtr2 Qtr3 Qtr 0 Store1 300 240 450 230 1 Store2 350 340 403 210 2 Store3 250 180 145 160 Answer the following questions: i. (^) Predict the output of the following python statement: a. print(df.size) b. (^) print(df[1:3]) ii. Delete the last row from the DataFrame. iii. Write Python statement to add a new column Total_Sales which is the addition of all the 4 quarter sales. OR (Option for part iii only) Write Python statement to export the DataFrame to a CSV file named data.csv stored at D: drive. To calculate the exponent for 3 raised to the power of 4. ii. (^) To display current date and time. iii. To round off the value -34.4567 to 2 decimal place. iv. To remove all the probable leading and trailing spaces from the column userid of the table named user. v. To display the length of the string ‘FIFA World Cup’.
Kabir has created following table named exam: +-------+--------- +------------------+-------+ | RegNo | Name
| Subject | Marks | +-------+---------+------------------+-------+ | 1 | Sanya | Computer Science | 98 | | (^) 2 | Sanchay | IP | 100 | | 3 | Vinesh^ | CS | 90 | | 4 | Sneha | IP | 99 | | 5 | Akshita | IP | 100 | +-------+---------+------------------+-------+ Help him in writing SQL queries to the perform the following task: i. (^) Insert a new record in the table having following values: [6,'Khushi','CS',85] ii. (^) To change the value “IP” to “Informatics Practices” in subject column. iii. To remove the records of those students whose marks are less than
iv. (^) To add a new column Grade of suitable datatype. v. To display records of “Informatics Practices” subject.