Project

General

Profile

« Previous | Next » 

Revision 12641

validation/aggregating/plots/bien3_validations_salvias_vegbien.sql: updated to DB

View differences:

trunk/validation/aggregating/plots/bien3_validations_salvias_vegbien.sql
77 77
 LIMIT 1)))
78 78
  ORDER BY plot.authorlocationcode;
79 79

  
80
-- ------------------
81
-- 7.List of plots with counts of individuals per species
82
-- ------------------
83 80
-- _plots_07_list_of_plots_which_use_counts_of_indiv_per_species
81
 SELECT project.projectname AS project_name, 
82
    plot.authorlocationcode AS plot_code
83
   FROM ((public.plot
84
   JOIN public.locationevent USING (plot_id))
85
   LEFT JOIN public.project USING (project_id))
86
  WHERE ((plot.source_id = ( SELECT public.source_by_shortname(:datasource::text) AS source_by_shortname)) AND (EXISTS ( SELECT NULL::unknown AS unknown
87
   FROM (((public.location
88
   JOIN public.locationevent locationevent_1 USING (location_id))
89
   JOIN public.taxonoccurrence USING (locationevent_id))
90
   JOIN public.aggregateoccurrence USING (taxonoccurrence_id))
91
  WHERE ((location.plot_location_id = plot.plot_id) AND (aggregateoccurrence.count > 1))
92
 LIMIT 1)))
93
  ORDER BY plot.authorlocationcode;
84 94

  
85

  
86

  
87 95
-- ------------------
88 96
-- 8.List of plots which use percent cover
89 97
-- ------------------

Also available in: Unified diff