I have a mysql database in which i have two datetime fields, one is start_date another one is end_date. So lets say scorer1 have a start_date and end_date | similarly scorer2 have a start_date and end_date.
Now how can i get the average days taken by all the scorers?
You can select the difference between the dates with mysql:
This will give you the total days difference, and the total rows it applies to.
Then once you’ve pulled that from the DB, use some PHP to work out the average: