首页 > 技术文章 > 分析函数

chonghaojie 2018-05-07 13:57 原文

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

推荐阅读