---
title: "取得表某个分组的最大值"
author: "disablebb"
date: "2011-12-23T16:46:49Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2011-12-23T16:46:49Z"
id: 1323279
url: "https://disablebb.iteye.com/blog/1323279"
---

select * from tablename a where a.createdate=(select max(b.createdate) from tablename b where a.channel=b.channel)