Demo entry 6783066



Submitted by anonymous on Jan 28, 2019 at 03:53
Language: SQL. Code size: 359 Bytes.

SELECT g.CarNo AS CarNo, 
		MIN(g.GpsTime) AS StartDate, 
		MAX(g.GpsTime) AS EndDate, 
		(MAX(g.CumulativeMileage) - MIN(g.CumulativeMileage)) AS CumulativeMileage, 
		(MAX(g.RealTimeOilQuantity) - MIN(g.RealTimeOilQuantity)) AS OilQuantity
		 FROM ${tableName} g 
		DATE_FORMAT(g.GpsTime, '%Y-%m-%d') = #{StartDate}
		AND g.CarNo = #{CarNo}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).