Query Confusion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trixxnixon
    New Member
    • Sep 2008
    • 98

    Query Confusion

    Im confusing myself and need a little bit of direction,
    I am trying to design a query with 3 fields, “Type” “Assigned Document Team”, and “Date Submitted”

    There are only 6 different “type”’s and 5 different “Assigned document team”’s

    I want the report to show me how many of each “type” was submitted for each “assigned document team” but I don’t want the detail for each record in the report.

    This is an example of what i want the report to look like.


    Assigned Document Team 1

    Type ----- Total
    Type 1 ----- 5
    Type 2 ----- 7


    Assigned Document Team 2

    Type ----- Total
    Type 1 ----- 5
    Type 2 ----- 12
    Type 3 ----- 2


    Would I need to have the query do the counting,
    Would I need another query to count of the results of the previous query,
    Or could the report do the counting and leave each individual records detail?

    Does this make sense?
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    You should be able to do this in one query like
    Code:
    SELECT Type, Count(Type) FROM MyTable GROUP BY [Assigned Document Team], Type

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      Trixx,

      The query for the report needs to be something like :
      Code:
      SELECT [Assigned Document Team],
             [Type],
             Count(*) AS Total
      
      FROM [YourTable]
      
      GROUP BY [Assigned Document Team],
               [Type]
      The report would need a detail section and a group section with a header for displaying the value of [Assigned Document Team].

      Does that clarify the problem a bit for you?

      Comment

      • trixxnixon
        New Member
        • Sep 2008
        • 98

        #4
        sorry i havent been on the board in a while to reply,

        yes this does clarify, i was able to create the report i needed.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #5
          Good news :)

          It's quite understandable that members are away from the site for a while. No worries.

          Comment

          Working...