Q:

Java sqlite computing students number in every month

Hello Programmers i hope you solve my problem. i want to compute every students absent in every month. example Angelo Gabarda | 3 absents in june. like that. im using java DB sqlite for my data base and im using Eclipse. 
Here is my video in my problem: https://www.youtube.com/watch?v=o0o-zCYI84I 
and if you want to download my java codes source from eclipse: https://drive.google.com/drive/folders/1HtkYxeVGkzGb6EQidbEQS7wRuExIjCbA 

A:

As you haven't provided details about your tables and column names, Let's assume your table name is Student and it has name column and date_absent column of type date, then you basically need following type of query that will give you in result, name, month and number of times absent in that month. Try using this query in your code.
select name,date_format(date_absent,'%Y-%M') as month, count(1) as numberOfTimesAbsent from Student group by name, month;

This query will give you something like this.
+-------------------+-------------+---------------------+
| name              | month       | numberOfTimesAbsent |
+-------------------+-------------+---------------------+
| Anurag Gupta      | 2018-August |        3            |
| Anurag Gupta      | 2018-July   |        2            |
| Anurag Arora      | 2018-August |        2            |
| Anurag Arora      | 2018-July   |        4            |
+-------------------+-------------+---------------------+

