Skip to content

Instantly share code, notes, and snippets.

@neotericdesign
Last active December 19, 2015 23:09
Show Gist options
  • Save neotericdesign/6033117 to your computer and use it in GitHub Desktop.
Save neotericdesign/6033117 to your computer and use it in GitHub Desktop.
koret_development=# select surveys.id, surveys.title,count(*) as count from surveys, survey_sessions, users where survey_sessions.completed_at is not null and users.id = survey_sessions.user_id and survey_sessions.survey_id = surveys.id group by surveys.id order by count;
(END)
id | title | count
----+---------------------------------------------------------------------------------------------------------------------------------------+-------
17 | Additional surveys will be added here | 5
22 | TEST YOUR KNOWLEDGE - Feline Sanitation | 22
11 | Performing Health Exams | 34
9 | Canine Kennel Sanitation | 36
25 | Canine Enrichment and Behavior | 42
26 | Feline Enrichment and Behavior | 47
21 | TEST YOUR KNOWLEDGE - Group Housing for Cats | 47
13 | Monitoring and Response | 47
24 | Vaccine Handling | 50
20 | Practices Identified as Unacceptable by the Association of Shelter Veterinarians' Guidelines for Standards of Care in Animal Shelters | 52
18 | Feline Vaccine | 78
12 | Canine Vaccine | 123
(12 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment