pggeodb.nancy.inrae.fr/db_arboretum
Previous topic Chapter index Next topic

View: v_infos_taxons

 

 

Schema

application

 

Owner

arboretum

 

Descriptions

Vue affichant le nombre d'individus mort, vivant ou indéterminé par taxon.

 

Columns

Name

Data type

Description

libelle

varchar(255)

 

sous_embranchement

varchar(16)

 

nom_simple

varchar(64)

 

synonyme

varchar(128)

 

origine

varchar(5)

 

nb_mort

bigint

 

nb_vivant

bigint

 

information_manquante

bigint

 

 

Rules

Name

Event

Instead

Condition

Description

_RETURN

SELECT

 

 

 

Indices

There are no indices for table v_infos_taxons

 

Definition

CREATE VIEW application.v_infos_taxons (
   libelle,
   sous_embranchement,
   nom_simple,
   synonyme,
   origine,
   nb_mort,
   nb_vivant,
   information_manquante)
AS
SELECT
tax.tax_libelle AS libelle,
   tax.tax_sous_embranchement AS sous_embranchement,
   tax.tax_nom_simple AS nom_simple,
   tax.tax_synonyme AS synonyme,
   tax.tax_origine AS origine,
   count(*) FILTER (
WHERE arb.arb_mort = true) AS nb_mort,
   count(*) FILTER (
WHERE arb.arb_mort = false) AS nb_vivant,
   count(*) FILTER (
WHERE arb.arb_mort IS NULL) AS information_manquante
FROM t_arbre_arb arb
    JOIN tr_taxon_tax tax ON arb.arb_tax_id = tax.tax_id
GROUP BY tax.tax_libelle, tax.tax_sous_embranchement, tax.tax_nom_simple,
   tax.tax_synonyme, tax.tax_origine
ORDER BY tax.tax_libelle;

COMMENT ON VIEW application.v_infos_taxons
IS 'Vue affichant le nombre d''individus mort, vivant ou indéterminé par taxon.';

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 07/12/2018 13:23
Previous topic Chapter index Next topic