如何从SQL Server获取最后一个菜单

时间:2018-04-19 09:45:19

标签: sql sql-server-2008

我在SQL Server中有这个表结构。我想选择STOP之前的最后一个菜单。我附上了SAMPLE DATA。任何人都能帮助我吗?

MENUNAME            CALLID                  TIME
=============================================================================
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    00:12.1
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    00:52.3
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    01:11.8
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    00:32.7
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    00:12.0
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    01:11.8
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    03:10.6
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    03:30.9
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    02:31.3
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    02:11.0
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    01:51.5
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    02:11.1
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    01:32.0
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    04:49.6
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    04:30.1
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    04:09.9
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    05:09.2
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    05:09.2
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    05:29.8
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    04:09.9
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    03:50.4
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    05:49.3
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    06:08.9
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    08:07.5
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    08:07.5
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    08:27.8
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    07:48.0
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    07:28.5
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    07:08.2
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    07:08.2
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    06:48.7
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    09:27.1
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    09:06.8
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    10:06.1
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    10:06.3
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    08:47.3
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    10:26.6
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    10:46.1
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    11:45.3
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    12:04.9
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    11:25.8
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    11:05.6
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    13:24.8
XFER_CALL_REASON    U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    13:04.5
STOP                U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    13:04.6
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    12:45.0
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    12:25.5
FEEDBACK_MAIN       U7QGBR0A4P7KDDIGRBHPP5KI0K029L6T    13:44.3

0 个答案:

没有答案