smnorris / bcfishobs

Reference BC Known Fish Observations to the Freshwater Atlas stream network
Apache License 2.0
6 stars 2 forks source link

flag maximal observations by species #6

Closed smnorris closed 6 years ago

smnorris commented 6 years ago

For quicker queries/lookups and easier visualization, add field flagging maximal observations, by species

smnorris commented 6 years ago

Ideally we could:

ALTER TABLE whse_fish.fiss_fish_obsrvtn_events ADD COLUMN maximal_species text[]

Then iterate through the species of interest, applying updates to add values to the maximal_species array. The problem is that the event locations are not unique. If two events are in the same spot, which record gets the max flag?