Project

General

Profile

« Previous | Next » 

Revision 12163

validation/aggregating/*/*.sql: use "" to preserve case in column aliases, so that they match the input queries

View differences:

trunk/validation/aggregating/plots/bien3_validations_salvias_vegbien.sql
73 73
-- Check: join to source db by all columns returns same number of rows
74 74
-- ------------------
75 75
CREATE OR REPLACE VIEW _05_list_of_plot_codes_by_project AS
76
SELECT p.projectname, l.authorlocationcode AS plotCode
76
SELECT p.projectname, l.authorlocationcode AS "plotCode"
77 77
FROM location l JOIN locationevent le
78 78
ON l.location_id=le.location_id
79 79
JOIN project p
......
297 297
CREATE OR REPLACE VIEW _18_list_of_subplots_codes_for_each_plot_for_each_project AS
298 298
select p.projectname, 
299 299
l.authorlocationcode as plotcode, 
300
sub_locationevent.authoreventcode as subplotCode
300
sub_locationevent.authoreventcode as "subplotCode"
301 301
from project p join source s 
302 302
on p.source_id=s.source_id
303 303
join locationevent le on p.project_id=le.project_id
trunk/validation/aggregating/traits/bien3_validations_traits_bien3.sql
11 11
-- 1. Count records
12 12
-- ------------------
13 13
CREATE OR REPLACE VIEW _01_count_records AS
14
SELECT COUNT(*) AS totalRecords
14
SELECT COUNT(*) AS "totalRecords"
15 15
FROM trait
16 16
JOIN taxonoccurrence USING (taxonoccurrence_id)
17 17
WHERE taxonoccurrence.source_id = source_by_shortname(current_schema)

Also available in: Unified diff