Computer Science, asked by satyamkumar5428, 3 months ago

Write an SQL command to find the numbers of students who are from section A.

Please tell the answer ​

Answers

Answered by MAULIKSARASWAT
2

Hey Bro, what is ur name, city and class ?

Give me answer at any my blank question, I will realy hit the Brainliest button..

Answer:  

SQL query using COUNT and HAVING clause  

Consider a table STUDENT having the following schema:  

STUDENT (Student_id, Student_Name, Address, Marks)  

Student_id is the primary column of STUDENT table.  

Let first create the table structure with CREATE Command in SQL:  

CREATE TABLE STUDENT  

(STUDENT_ID NUMBER (4),  

STUDENT_NAME VARCHAR2 (20),  

ADDRESS VARCHAR2 (20),

MARKS NUMBER (3),

PRIMARY KEY (STUDENT_ID));

Answered by AadilPradhan
1

MySQL query to find the numbers of students who are from section A is

SELECT COUNT(std_name) FROM student WHERE section = "A";

  • Here COUNT is used to count the number of students in the student table.
  • WHERE is used to apply a constraint. Here constraint is 'section A'.
  • SELECT is used to select and display the required content.

#SPJ3

Similar questions