分析函数

row_number() over(partition by csr.cp_number order by csr.reply_time desc) as rownumber

Mysql 实现:

SELECT
	tv.CELL_CODE AS "cellCode",
	SUBSTRING_INDEX(
		GROUP_CONCAT(
			tv.VOLTAGE
			ORDER BY
				tv.TEST_TIME desc
		),
		',',
		1
	)
FROM
	tt_wo_cell_test_voltage tv
GROUP BY
	tv.CELL_CODE
posted @ 2018-05-07 13:57  南村一哥  阅读(138)  评论(0)    收藏  举报