I have trucks entereing different loading zones. Each time the truck enters a loading zone, it makes an entry into our mysql table witht the following fields: id, truckName, date, latitude, longitude, speedInZone, zoneName. Through out the day the trucks will enter a leave the zone multiple times. I need to pull the following data:
truckName, DateTime of last entry in this zone, zoneName, Count of how many times this truck entered this zone.
I am thinking maybe a group by truckName, zoneName may be the right direction but I need a little help.