All pastes #136679 Raw Edit

Untitled

public sql v1 · immutable
#136679 ·published 2006-08-17 20:53 UTC
rendered paste body
/* Here is the outline for the table */CREATE TABLE tbl (  name VARCHAR(255),  value INT(10) UNSIGNED,  text TEXT);/*I want to select every `name`, `value`, and `text` from the tablefor every row that `name` is unique.  For the rows that `name` isnot unique, I need to select `name`, `value`, and `text` from ONLYthe row that has the highest `value`.How do I do this?*/