我有个问题。我想在行值更改时找到行值之间的时间差异。我的表中有以下类似数据,例如:
------------------------------------
DateandTime | DCStatus
------------------------------------
2012-01-01 01:00:00 | Using
2012-01-02 02:00:00 | Using
2012-01-03 03:00:00 | Using
2012-01-04 04:00:00 | Charging
2012-01-05 05:00:00 | Charging
2012-01-06 06:00:00 | Using
2012-01-06 07:00:00 | Using
2012-01-06 08:00:00 | Using
2012-01-05 09:00:00 | Charging
2012-01-05 10:00:00 | Charging
2012-01-05 11:00:00 | Charging
------------------------------------
从这个给定的数据库如何计算平均充电时间和放电时间?我对 SQL 编程很陌生。请帮我!!