Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

aggregate query



I have a table

CREATE TABLE survey_load
(
 meter_id character(5) NOT NULL,
 number_of_bays integer NOT NULL,
 bay_1_use integer,
 bay_2_use integer,
 bay_3_use integer,
 bay_4_use integer,
 bay_5_use integer,
 date date NOT NULL,
 inspection_id integer NOT NULL DEFAULT,
)

How do i present an aggregate query

inspection_id  |  meter_id  |  bay_use
1                 12345        (value of bay_1_use)
1                 12345        (value of bay_2_use)
1                 12345        (value of bay_3_use)
2                 23456        (value of bay_1_use)
2                 23456        (value of bay_2_use)
2                 23456        (value of bay_3_use)
2                 23456        (value of bay_4_use)
2                 23456        (value of bay_5_use)

Thanks



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group