mysql - How to use html type="date" for count in sql for number of student enrolled in a year? -


i have problem on how count number of students in year enroll?

my "datefilled" html type="date"

'select datefilled, count(datefilled) number_of_enrolled studentinformation group datefilled' 

but problem cant count year total of student

i assume date format html input type=date yyyy-mm-dd. regardless if database field type datetime or varchar, can use function year() plus group by aggregate records statement:

select year(datefilled) year, count(datefilled) number_of_enrolled  studentinformation group year(datefilled); 

enter image description here


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -