From 4d8b22d69f1b494e162e9183d23d1fe1c1548eed Mon Sep 17 00:00:00 2001 From: Brian Ballsun-Stanton Date: Fri, 24 Oct 2014 02:32:10 +0000 Subject: [PATCH] vocab order --- formatter/test.format | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/formatter/test.format b/formatter/test.format index 94a9008..85f9068 100644 --- a/formatter/test.format +++ b/formatter/test.format @@ -39,13 +39,13 @@ create view if not exists latestNonDeletedArchEntFormattedIdentifiers as select uuid, aenttypeid, aenttypename, group_concat(response, ' ') as response, null as deleted, aentcountorder from ( - select uuid, aenttypeid, aenttypename, group_concat(format(formatstring, vocabname, measure, freetext, certainty), appendcharacterstring) as response, null as deleted, aentcountorder - from latestNonDeletedArchent +select uuid, aenttypeid, aenttypename, group_concat(format(formatstring, vocabname, measure, freetext, certainty), appendcharacterstring) as response, null as deleted, aentcountorder, group_concat(vocabcountorder) + from latestNonDeletedArchent JOIN aenttype using (aenttypeid) JOIN idealaent using (aenttypeid) join attributekey using (attributeid) - join latestNonDeletedAentValue using (uuid, attributeid) - left outer join vocabulary using (attributeid, vocabid) + join (select * from latestNonDeletedAentValue + left outer join vocabulary using (attributeid, vocabid) order by vocabcountorder) using (uuid, attributeid) WHERE isIdentifier = 'true' group by uuid, attributeid having response is not null @@ -68,8 +68,8 @@ from ( JOIN aenttype using (aenttypeid) JOIN idealaent using (aenttypeid) join attributekey using (attributeid) - join latestnondeletedaentvalue using (uuid, attributeid) - left outer join vocabulary using (attributeid, vocabid) + join (select * from latestNonDeletedAentValue + left outer join vocabulary using (attributeid, vocabid) order by vocabcountorder) using (uuid, attributeid) WHERE isIdentifier = 'true' group by uuid, attributeid having response is not null