joseph.larrew
Registered User.
- Local time
- Today, 11:09
- Joined
- Oct 26, 2010
- Messages
- 13
First off, I'm using 2 queries, LAME ASS (which stands for "Longterm Average MEdia ASSessment) and SUB LAME ASS. Here is the code for both:
SUB LAME ASS:
SELECT EXSUMs.[IPA/West], EXSUMs.LOO.Value, EXSUMs.Tone, EXSUMs.[EXSUM Date], EXSUMs.[EXSUM Body]
FROM EXSUMs
WHERE EXSUMs.[IPA/West] = [Enter '1' for IPA/'2' for Western] AND EXSUMs.[EXSUM Date] BETWEEN [Enter Begin Date] AND [Enter End Date];
LAME ASS:
SELECT EXSUMS.LOO.Value, COUNT (EXSUMs.LOO.Value) AS [Number of EXSUMS by LOO]
FROM [SUB LAME ASS]
GROUP BY EXSUMs.LOO.Value;
The results when I run the LAME ASS query resemble the following:
LOO.Value..........Number of EXSUMs by LOO
Security ............x
Political .............y
Rule of Law ........z
so on and so on...
So as you can see, I'm successfully counting and grouping by LOO.Value. Now what I want to do is count the tone and sub-group the count of the tone under each LOO.Value.
I'd like to make something that looks like this:
LOO.Value ......Tone.........Number of EXSUMs
Security..........Positive ....x
.....................Negative....y
.....................Neutral .....z
.....................Total1 ......x+y+z
Political ..........Positive ....a
.....................Negative ...b
.....................Neutral .....c
.....................Total2 ......a+b+c
.....................Total3 ......(x+y+z+a+b+c) or (Total1+Total2)
To me, it seems like maybe I need to make one or two more nested queries, but I'm not sure how to go about it. Any help would be greatly appreciated.
SUB LAME ASS:
SELECT EXSUMs.[IPA/West], EXSUMs.LOO.Value, EXSUMs.Tone, EXSUMs.[EXSUM Date], EXSUMs.[EXSUM Body]
FROM EXSUMs
WHERE EXSUMs.[IPA/West] = [Enter '1' for IPA/'2' for Western] AND EXSUMs.[EXSUM Date] BETWEEN [Enter Begin Date] AND [Enter End Date];
LAME ASS:
SELECT EXSUMS.LOO.Value, COUNT (EXSUMs.LOO.Value) AS [Number of EXSUMS by LOO]
FROM [SUB LAME ASS]
GROUP BY EXSUMs.LOO.Value;
The results when I run the LAME ASS query resemble the following:
LOO.Value..........Number of EXSUMs by LOO
Security ............x
Political .............y
Rule of Law ........z
so on and so on...
So as you can see, I'm successfully counting and grouping by LOO.Value. Now what I want to do is count the tone and sub-group the count of the tone under each LOO.Value.
I'd like to make something that looks like this:
LOO.Value ......Tone.........Number of EXSUMs
Security..........Positive ....x
.....................Negative....y
.....................Neutral .....z
.....................Total1 ......x+y+z
Political ..........Positive ....a
.....................Negative ...b
.....................Neutral .....c
.....................Total2 ......a+b+c
.....................Total3 ......(x+y+z+a+b+c) or (Total1+Total2)
To me, it seems like maybe I need to make one or two more nested queries, but I'm not sure how to go about it. Any help would be greatly appreciated.
Last edited: