0% found this document useful (0 votes)
11 views4 pages

Table

The document contains a series of SQL queries related to a 'student' database. These queries include selecting all students, filtering by age and course, calculating averages and sums of marks, counting students by city and gender, and retrieving specific details based on conditions. Overall, the queries aim to analyze student data based on various criteria.

Uploaded by

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

Table

The document contains a series of SQL queries related to a 'student' database. These queries include selecting all students, filtering by age and course, calculating averages and sums of marks, counting students by city and gender, and retrieving specific details based on conditions. Overall, the queries aim to analyze student data based on various criteria.

Uploaded by

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

1)Query:- SELECT * FROM `student`;

2)Query:- SELECT * FROM `student` WHERE age>21;

3)Query:- SELECT * FROM `student` WHERE course='science';

4)Query:- SELECT AVG(marks) from student;

5)Query:- SELECT Course,COUNT(Course) as student_count FROM student


GROUP BY Course;

6)Query:- SELECT name FROM student WHERE Marks=(SELECT MAX(Marks)


FROM student);
7)Query:- SELECT * FROM `student` WHERE gender='female';

8)Query:- SELECT SUM(Marks) FROM student WHERE City='vadodara';

9)Query:- SELECT name,marks FROM student ORDER BY Marks desc;

10)Query:- SELECT COUNT(*) AS count_surat FROM student WHERE


City='surat';

11)Query:- SELECT Name,Marks FROM student WHERE Marks>80;


12)Query:- SELECT name,age FROM student WHERE age=(SELECT min(age)
FROM student);

13)Query:- SELECT COUNT(name) FROM student;

14)Query:- SELECT name,Marks FROM student ORDER BY Course asc;

15)Query:- SELECT course,avg(marks) as marks_count FROM student GROUP


By course;

16)Query:- SELECT * FROM `student` WHERE city='ahmedabad' or City='surat';


17)Query:- SELECT name,marks FROM `student` WHERE Marks BETWEEN 80
and 90;

18)Query:- SELECT gender,count(gender) AS count_gender from student group


by gender;

You might also like