हिंदी

Raghav, who works as a database designer, has created a table Student as shown below: Table: Student StudentID 101, 102, 103, 104, 105 Name Aarav Sharma, Priya Iyer Rohan, Verma Simran - Informatics Practices

Advertisements
Advertisements

प्रश्न

Raghav, who works as a database designer, has created a table Student as shown below:

Table: Student

StudentID Name City Marks Admission_Date
101 Aarav Sharma Delhi 85 2022-04-01
102 Priya Iyer Mumbai 78 2021-05-15
103 Rohan Verma Bangalore 92 2020-06-10
104 Simran patel Delhi 88 2022-03-20
105 Karan yadav Delhi 75 2021-08-05

Write suitable SQL query for the following.

  1. Show the Name and City of the students, both in uppercase, sorted alphabetically by Name.
  2. Display the Student ID along with the name of the month in which the student was admitted to the school.
  3. Calculate and display the average marks obtained by students.
  4. Show the names of the cities and the number of students residing in the city.
कोड लेखन
Advertisements

उत्तर

  1. SELECT UPPER(Name), UPPER(City) FROM Student ORDER BY
    Name;
  2. SELECT StudentID, MONTHNAME(Admission_Date) FROM Student;
  3. SELECT AVG(Marks)FROM Student;
  4. SELECT City, COUNT(*) FROM Student GROUP BY City;
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×