Project

General

Profile

« Previous | Next » 

Revision 12510

fix: schemas/vegbien.sql: _plots_06_list_of_plots_with_stem_measurements: changed columns to match input query

View differences:

trunk/schemas/vegbien.my.sql
1111 1111

  
1112 1112

  
1113 1113
--
1114
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1115
--
1116

  
1117
CREATE TABLE `~type._plots_06_list_of_plots_with_stem_measurements` (
1118
    project_name varchar(255),
1119
    `SiteCode` varchar(255)
1120
);
1121

  
1122

  
1123
--
1114 1124
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1115 1125
--
1116 1126

  
......
6880 6890

  
6881 6891

  
6882 6892
--
6893
-- Data for Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE DATA; Schema: public_validations; Owner: -
6894
--
6895

  
6896

  
6897

  
6898
--
6883 6899
-- Data for Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE DATA; Schema: public_validations; Owner: -
6884 6900
--
6885 6901

  
trunk/schemas/vegbien.sql
2498 2498

  
2499 2499

  
2500 2500
--
2501
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2502
--
2503

  
2504
CREATE TABLE "~type._plots_06_list_of_plots_with_stem_measurements" (
2505
    project_name text,
2506
    "SiteCode" text
2507
);
2508

  
2509

  
2510
--
2501 2511
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2502 2512
--
2503 2513

  
......
6105 6115
--
6106 6116

  
6107 6117
CREATE VIEW _plots_06_list_of_plots_with_stem_measurements AS
6108
 SELECT top_plot.authorlocationcode
6109
   FROM public.top_plot
6118
 SELECT project.projectname AS project_name, 
6119
    top_plot.authorlocationcode AS "SiteCode"
6120
   FROM ((public.top_plot
6121
   JOIN public.locationevent USING (location_id))
6122
   JOIN public.project USING (project_id))
6110 6123
  WHERE ((top_plot.source_id = public.source_by_shortname(("current_schema"())::text)) AND (EXISTS ( SELECT NULL::unknown AS unknown
6111
           FROM (((((public.location
6112
      JOIN public.locationevent USING (location_id))
6124
   FROM (((((public.location
6125
   JOIN public.locationevent locationevent_1 USING (location_id))
6113 6126
   JOIN public.taxonoccurrence USING (locationevent_id))
6114 6127
   JOIN public.aggregateoccurrence USING (taxonoccurrence_id))
6115 6128
   JOIN public.plantobservation USING (aggregateoccurrence_id))
......
9368 9381

  
9369 9382

  
9370 9383
--
9384
-- Data for Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE DATA; Schema: public_validations; Owner: -
9385
--
9386

  
9387

  
9388

  
9389
--
9371 9390
-- Data for Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE DATA; Schema: public_validations; Owner: -
9372 9391
--
9373 9392

  

Also available in: Unified diff