R
R
R02021-06-15 18:28:59
SQL
R0, 2021-06-15 18:28:59

Why doesn't count(extract stack) and how can I replace it?

you need to get the number of identical months

select count(extract(month from birth_date)) as pupils
from pupil
group by pupils
having count(*) > 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2021-06-15
@LaRN

In theory, everything is solved here by the correct grouping:

select  pupils, extract(month from birth_date), count(1) as pupils
   from pupil
 group by pupils, extract(month from birth_date)
having count(1) > 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question