By Joe, I think you've got it!!! (with one small change..)
GROUP BY currposition.
pk) AS tbMax - should be
GROUP BY currposition.
veh) AS tbMax
These records match the last veh / pk in the table!
Sweet - all in a single pass (query)!
Finished loading and connecting page
Each Tblfields Map: (MyMap) {id=163, pk=
1495727604483, drvid=1042, veh=55555, onshift=1, work=0, lat=50.7316282, lon=-120.0393811, currspeed=0.0, comp_id=70, sent=0, lastdate=
1495727604483}
Each Tblfields Map: (MyMap) {id=161, pk=1495725501474, drvid=1042, veh=55777, onshift=1, work=0, lat=50.7299352, lon=-120.0256379, currspeed=21.8, comp_id=70, sent=0, lastdate=1495725501474}
Each Tblfields Map: (MyMap) {id=147, pk=1495701455456, drvid=1042, veh=552333, onshift=1, work=1, lat=50.7316754, lon=-120.0393516, currspeed=0.0, comp_id=70, sent=0, lastdate=1495701455456}
Each Tblfields Map: (MyMap) {id=128, pk=1495671694362, drvid=1042, veh=132777, onshift=0, work=0, lat=50.7344583, lon=-120.2308422, currspeed=50.3, comp_id=70, sent=0, lastdate=1495671694362}
Each Tblfields Map: (MyMap) {id=125, pk=1495670490459, drvid=1042, veh=93333, onshift=1, work=1, lat=50.7122575, lon=-120.3107522, currspeed=52.0, comp_id=70, sent=0, lastdate=1495670490459}
Each Tblfields Map: (MyMap) {id=75, pk=1495589510272, drvid=1042, veh=210244, onshift=1, work=1, lat=50.7316842, lon=-120.0393326, currspeed=0.0, comp_id=70, sent=0, lastdate=1495589510272}
Each Tblfields Map: (MyMap) {id=71, pk=1495586805308, drvid=1042, veh=21045, onshift=1, work=1, lat=50.7557273, lon=-120.1570492, currspeed=54.8, comp_id=70, sent=0, lastdate=1495586805308}
Each Tblfields Map: (MyMap) {id=65, pk=1495584702281, drvid=1042, veh=21044, onshift=1, work=1, lat=50.7523934, lon=-120.1080273, currspeed=49.2, comp_id=70, sent=0, lastdate=1495584702281}
Each Tblfields Map: (MyMap) {id=58, pk=
1495575387368, drvid=1042, veh=16734, onshift=1,
work=1, lat=50.7294017, lon=-120.0247434, currspeed=11.7, comp_id=70, sent=0, lastdate=
1495575387368}
locationPage84d8f5fa-dc19-4a25-878d-d59d7a2cc5ea
event name: gm1_ready (MyMap) {eventparams=, eventname=gm1_ready}
event name: gm1_ready (MyMap) {eventparams=, eventname=gm1_ready}
Nice to have SQL experts in the camp!
Thanks SO Much!
I color coded the icons based on Loaded (green) or empty (red) -
work=1 means loaded...