[vox-tech] yet another SQL question...

David Hummel dhml at comcast.net
Mon Nov 22 19:06:08 PST 2004


On Mon, Nov 22, 2004 at 02:00:59PM -0800, Dylan Beaudette wrote:
> 
> I would like to make a table that displays the dominant component
> (i.e.  comppct_r is the largest for a given larger unit) and
> associated attributes for each larger unit.

I would use CREATE TABLE ... SELECT.

I think the following SELECT will work:

  select
    mukey,
    max(comppct_r),
    taxorder, 
    taxsuborder,
    taxgrtgroup 
  from component
  group by mukey;

-David


More information about the vox-tech mailing list