2021 Top 4 Best Upcoming Flagship Smartphones : which are the best mobile phones for you..?

Image
  Hi here are the top 8 best upcoming flagship smartphones of 2021 with high-end level features improved cameras stunning design and many other next-generation technologies will be applied that you will really enjoy also the price and the release date of the smartphones are discussed. Number four Asus Zenfone 8 Number three OnePlus 9 Number two Huawei P50 Number one Apple iPad Pro 12.9

How to sum total time utilize in each week of a month?

Assuming that the attendance table has a date column attendance_date, the below query may give you total time utilized per week in the month:
SELECT WEEK(`attendance_date`) `attendance_week`,SEC_TO_TIME(SUM(TIME_TO_SEC(`time_utilize`))) `attendance_time_utilized`FROM `attendance`GROUP BY `attendance_week`;
In the above query, the attendance_week is calculated as the week of the year, between 1 and 52.

Another form of output might be to show weeks as 1,2,3,4. For it, you may try this query:
SELECT (`attendance_week` - `min_week` + 1) `att_week`, `attendance_time_utilizedFROM SELECT WEEK(`ATT`.`attendance_date`) `attendance_week`, SEC_TO_TIME(SUM(TIME_TO_SEC(`ATT`.`time_utilize`))) `attendance_time_utilized`, `T1`.`min_weekFROM `attendance` `ATT` INNER JOIN (SELECT MIN(WEEK(`attendance_date`)) `min_week` FROM `attendance`) T1 GROUP BY `attendance_week`) T2; 
 Hope the above queries help you with the desired results. Please change the table and column names as per your schema.

Comments

Popular posts from this blog

Import UTF-8 languages from Excel to Database using PHP

Unlink file in CodeIgniter

2021 Top 4 Best Upcoming Flagship Smartphones : which are the best mobile phones for you..?