SQL Questions
SQL Questions
2. Mr. Atharva is given a task to create a database, Admin. He has to create a table, users in the
User_id - int
User_name - varchar(20)
Password - varchar(10)
3. Ms. Rita is a database administrator at a school. She is working on the table, student containing
the columns like Stud_id, Name, Class, and Stream. She has been asked by the Principal to strike
off the record of a student named Rahul with student_id as 100 from the school records and add
Stud_id - 123
Name - Rajeev
Class - 12
Stream - Science
4. Consider the table Stationery and write the output of the following SQL queries:
(ii) SELECT ITEMNO, ITEM FROM STATIONERY WHERE DISTRIBUTOR = 'Classic Plastics'
(iii) SELECT ITEM, QTY * PRICE AS 'AMOUNT' FROM STATIONERY WHERE ITEMNO = 402;
5. Based on the table Rent_cab:
(i) Display the game type and average number of games played in each type.
(ii) Display prize money, name of the game, and name of the players from the tables Games and
Players.
(iv) Display the name of the game and prize money of those games whose prize money is known.