R
Robin
Table: [Publish Table]
Description: One row per email sent in by a student. Emails are feedback on
the course they are taking.
Columns:
[Course Name] = class they are taking
[People ID] = student identifier
[Comment] = comment about the class that day
[Date] = date/time of the email
Goal: I'd like to count the number of students that have submitted an email
by the course name. Everything I've tried returns to me the number of records
(=emails) by course.
Query:
SELECT [Publish Table].[Course Name], Count([Publish Table].[People ID]) AS
CountPeople
FROM [Publish Table]
GROUP BY [Publish Table].[Course Name], [Publish Table].[People ID];
Example Data (there is also a date and other data per row)
Course Name Student ID Comment
Course 01 01 I loved the class today.
Course 01 01 Tests were too hard today.
Course 01 02 This class is boring.
Course 01 03 I had to take this class, I don't like it.
Course 01 04 I realized I actually do like this class.
Course 02 02 This is the best class I've ever had.
Course 02 02 I don't understand the material.
Course 02 03 I love this class.
What I want to get back from my query:
Course 01 3 (i.e. three people in course one sent in one or more comment)
Course 02 2
What I get back from my query:
Course 01 2 (number of emails from student 01)
Course 01 1 (number of emails from student 02)
Course 01 1 (number of emails from student 03)
Course 02 2 (number of emails from student 02)
Course 02 1 (number of emails from student 03)
What am I doing wrong?
Description: One row per email sent in by a student. Emails are feedback on
the course they are taking.
Columns:
[Course Name] = class they are taking
[People ID] = student identifier
[Comment] = comment about the class that day
[Date] = date/time of the email
Goal: I'd like to count the number of students that have submitted an email
by the course name. Everything I've tried returns to me the number of records
(=emails) by course.
Query:
SELECT [Publish Table].[Course Name], Count([Publish Table].[People ID]) AS
CountPeople
FROM [Publish Table]
GROUP BY [Publish Table].[Course Name], [Publish Table].[People ID];
Example Data (there is also a date and other data per row)
Course Name Student ID Comment
Course 01 01 I loved the class today.
Course 01 01 Tests were too hard today.
Course 01 02 This class is boring.
Course 01 03 I had to take this class, I don't like it.
Course 01 04 I realized I actually do like this class.
Course 02 02 This is the best class I've ever had.
Course 02 02 I don't understand the material.
Course 02 03 I love this class.
What I want to get back from my query:
Course 01 3 (i.e. three people in course one sent in one or more comment)
Course 02 2
What I get back from my query:
Course 01 2 (number of emails from student 01)
Course 01 1 (number of emails from student 02)
Course 01 1 (number of emails from student 03)
Course 02 2 (number of emails from student 02)
Course 02 1 (number of emails from student 03)
What am I doing wrong?