From 4808b390718cdd25528cf7a7852b28c86bbb68b4 Mon Sep 17 00:00:00 2001 From: ecophilina Date: Thu, 3 Aug 2023 00:00:42 -0700 Subject: [PATCH] remove trip month and survey info for sample sql because it clashes with the version in get survey sets --- inst/sql/get-survey-samples2.sql | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/inst/sql/get-survey-samples2.sql b/inst/sql/get-survey-samples2.sql index 9394acf..da40b3f 100644 --- a/inst/sql/get-survey-samples2.sql +++ b/inst/sql/get-survey-samples2.sql @@ -1,15 +1,8 @@ SELECT TRIP_START_DATE, SM.FISHING_EVENT_ID, YEAR(TRIP_START_DATE) AS YEAR, - MONTH(TRIP_START_DATE) AS MONTH, GEAR_CODE AS GEAR, S.SURVEY_SERIES_ID, - CASE WHEN SURVEY_SERIES_ALT_DESC IS NULL THEN SURVEY_SERIES_TYPE_ALT_DESC - WHEN SURVEY_SERIES_TYPE_ALT_DESC IS NULL THEN SURVEY_SERIES_ALT_DESC - WHEN SURVEY_SERIES_TYPE_ALT_DESC = 'OTHER' THEN SURVEY_SERIES_ALT_DESC - ELSE (SURVEY_SERIES_TYPE_ALT_DESC + ' ' + SURVEY_SERIES_ALT_DESC) - END AS SURVEY_ABBREV, - SURVEY_SERIES_DESC, TS.SURVEY_ID, SM.MAJOR_STAT_AREA_CODE, MSA.MAJOR_STAT_AREA_NAME, @@ -87,4 +80,4 @@ SM.SAMPLE_TYPE_CODE IN (1, 2, 6, 7, 8) AND -- insert species here -- insert ssid here -- insert major here -ORDER BY SURVEY_ABBREV, YEAR(TRIP_START_DATE) +ORDER BY S.SURVEY_SERIES_ID, YEAR(TRIP_START_DATE)