Schema
Owner
globoxylo_application
Descriptions
There is no description for view v_measure_sam
Columns
Name | Data type | Description |
---|---|---|
hierarchical_study_zone |
public.ltree |
|
tree_code |
varchar(24) |
|
taxon_code |
varchar(64) |
|
sample_code |
varchar(16) |
|
sample_date |
date |
|
sample_note |
varchar(255) |
|
variable_name |
varchar(50) |
|
variable_code |
varchar(25) |
|
repetition |
integer |
|
generic_value |
text |
|
numeric_value |
double precision |
|
text_value |
varchar |
|
date_value |
date |
|
measurement_date |
date |
|
precision_measurement_date |
double precision |
|
precision_measurement |
double precision |
|
unit_name |
varchar(50) |
|
protocol_name |
varchar(50) |
|
protocol_description |
varchar(255) |
|
protocol_url |
varchar(255) |
|
origin_file_name |
varchar(120) |
|
origin_file_url_path |
varchar(255) |
|
Rules
Name | Event | Instead | Condition | Description |
---|---|---|---|---|
_RETURN |
SELECT |
|
|
Indices
There are no indices for table v_measure_sam
Definition
CREATE VIEW application.v_measure_sam (
hierarchical_study_zone,
tree_code,
taxon_code,
sample_code,
sample_date,
sample_note,
variable_name,
variable_code,
repetition,
generic_value,
numeric_value,
text_value,
date_value,
measurement_date,
precision_measurement_date,
precision_measurement,
unit_name,
protocol_name,
protocol_description,
protocol_url,
origin_file_name,
origin_file_url_path)
AS
SELECT tr_study_zone_zon.zon_tree AS hierarchical_study_zone,
t_tree_tre.tre_code AS tree_code,
tr_taxon_tax.tax_identifier_ext AS taxon_code,
t_sample_sam.sam_code AS sample_code,
t_sample_sam.sam_date AS sample_date,
t_sample_sam.sam_note AS sample_note,
tr_variable_var.var_name AS variable_name,
tr_variable_var.var_code AS variable_code,
t_measure_msam.msam_repetition AS repetition,
COALESCE(t_measure_msam.msam_value_num::text,
t_measure_msam.msam_value_text::text, t_measure_msam.msam_value_date::text) AS generic_value,
t_measure_msam.msam_value_num AS numeric_value,
t_measure_msam.msam_value_text AS text_value,
t_measure_msam.msam_value_date AS date_value,
t_measure_msam.msam_date_measurement AS measurement_date,
t_measure_msam.msam_precision_date_measurement AS precision_measurement_date,
t_measure_msam.msam_precision_measurement AS precision_measurement,
tr_unit_uni.uni_name AS unit_name,
tr_protocol_prot.prot_name AS protocol_name,
tr_protocol_prot.prot_description AS protocol_description,
tr_protocol_prot.prot_url AS protocol_url,
tr_file_fil.fil_name AS origin_file_name,
tr_file_fil.fil_url AS origin_file_url_path
FROM tr_study_zone_zon
JOIN t_tree_tre ON tr_study_zone_zon.zon_id = t_tree_tre.tre_zon_id
JOIN tr_taxon_tax ON t_tree_tre.tre_tax_id = tr_taxon_tax.tax_id
JOIN t_sample_sam ON t_sample_sam.sam_tre_id = t_tree_tre.tre_id
LEFT JOIN t_measure_msam ON t_sample_sam.sam_id = t_measure_msam.msam_sam_id
JOIN tr_variable_var ON t_measure_msam.msam_var_id = tr_variable_var.var_id
LEFT JOIN tr_unit_uni ON t_measure_msam.msam_uni_id = tr_unit_uni.uni_id
LEFT JOIN tr_type_measure_tym ON t_measure_msam.msam_tym_id =
tr_type_measure_tym.tym_id
LEFT JOIN tr_protocol_prot ON t_measure_msam.msam_prot_id =
tr_protocol_prot.prot_id
LEFT JOIN tr_file_fil ON t_measure_msam.msam_fil_id = tr_file_fil.fil_id
ORDER BY tr_study_zone_zon.zon_tree, t_tree_tre.tre_code,
t_sample_sam.sam_date, tr_variable_var.var_code, t_measure_msam.msam_repetition;
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) |
![]() ![]() ![]() |