I have an SQL table for student attendance that has the following columns
I basically want to scan the table and find the month where everyone started their activity. This happens by calculating the first month where Total > 0 or DataPresent = 1 starting from the month of July.
Since our fiscal year starts in July, the year begins from that month and ends in June
I have attached an example illustrating what I am looking for.