Open kyohoonsim opened 1 year ago
6-1. select count(age), age from student group by age;
6-1-1. select count(age), age from student group by age having age > 23;
6-2. select school, count(school) from student where age >= 23 group by school;
6-1 .SELECT
age, COUNT(age)
FROM student
GROUP BY age
HAVING age > 23;
6-2. SELECT
school, COUNT(school)
FROM student
WHERE age >= 23
GROUP BY school;
6-1.
SELECT age, COUNT(age)
FROM student
GROUP BY age
HAVING age>23 ;
6-2.
SELECT school, COUNT(school)
FROM student
WHERE age>=23
GROUP BY school;
SELECT
age,COUNT(age)
FROM student
GROUP BY age;
SELECT age,COUNT(age) FROM student GROUP BY age HAVING age>23;
SELECT
school,COUNT(school)
FROM student
WHERE age>=23
GROUP BY school;
6-1
6-1-1
6-2
6-1.
SELECT age, COUNT(age) FROM student GROUP BY age;
6-2.
SELECT age, COUNT(age)
FROM student
GROUP BY age
HAVING age > 23;
6-3.
SELECT school, COUNT(school)
FROM student
WHERE age >= 23
GROUP by school;
SELECT count(age), age FROM student GROUP BY age HAVING age > 23;
SELECT school, count(school) FROM student WHERE age >= 23 GROUP BY school;
SELECT age, CO
UNT(age) FROM student GROUP BY age;
SELECT age, COUNT(age)
FROM student
WHERE age >23
GROUP BY age;
SELECT school, COUNT(school)
FROM student
WHERE age >23
GROUP BY school;
6-1
SELECT age, COUNT(age) from student group by age;
6-1-1
정답1) SELECT age, count(age) from student where age > 23 group by age;
정답2) select age, count(age) from student group by age having age > 23;
6-2
select school, COUNT(school) from student where age > 23 group by school;
6-1 SELECT age, COUNT(age) from student group by age HAVING age >23;
6-2 SELECT school, COUNT(school) from student where age >= 23 group by school;
6-1 SELECT age, count(*) FROM student GROUP BY age;
6-1-1 SELECT age, count(age) FROM student GROUP BY age HAVING age > 23;
6-2 SELECT school, count(school) FROM student WHERE age >= 23 GROUP BY school;
6-1 SELECT age, COUNT(age) FROM student GROUP BY age;
6-1-1 SELECT age, COUNT(age) FROM student GROUP BY age HAVING age > 23;
6-2 SELECT school, COUNT(school) FROM student WHERE age > 23 GROUP BY school;
6-1.
select age as 나이, count(*) as 학생수 from student group by age;
6-1-1.
select age as 나이, count(*) as 학생수 from student group by age having age > 23;
6-2.
select school as 학교, count(*) as 학생수 from student where age >= 23 group by school;
6-1 select count(age), age from student group by age;
6-1-1 select count(age), age from student group by age having age >23;
6-2 select school, count(school) from student where age >=23 group by school;
6-1
6-1-1
6-2
6-1
SELECT age, COUNT(name)
FROM student
GROUP BY age
HAVING age > 23;
6-2
SELECT school, COUNT(name)
FROM student
WHERE age >= 22
GROUP BY school;
6-1. select age, count(age) from student group by age;
6-1-1. select age, count(age) from student group by age having age > 23;
6-2. select school, count(email) from student where age >= 23 group by school;
6-1.
SELECT age,COUNT(age) FROM student GROUP BY age;
6-1-1.
SELECT
age
, COUNT(age)
FROM student
GROUP BY age
HAVING age > 23;
6-2.
SELECT
school
, COUNT(email)
FROM student
WHERE age >= 23
GROUP BY School;
7. SELECT * from student where age > (select avg(age) from student);
6-1. [SQL 쿼리] [실행화면 캡쳐]
6-2. [SQL 쿼리] [실행화면 캡쳐]