Consulting

Results 1 to 3 of 3

Thread: SubQuery Amnesia???

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    SubQuery Amnesia???

    I cannot come up with a query (in Access) for this:

    I have 2 tables: Agents with AgentID

    and calls With Date, AgentID, Category, Cnt [Count]

    So on any given day an agent can have calls to any number of categories, but 1 category is contained in every day [call it D]

    So Select Count(cnt) [create inner join the ID's] order by date, category can give me the counts for all categories or the total count per agent per day.

    and using WHERE category="D" can give me the count for my main category.

    I want to perform a subquery to get either (1) the total count for all categories and the count for D or (2) the percentage of D for the total count - by agent by date,

    every subquery (and I am embarresed to post them) I have tried has failed.

  2. #2
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    can you post sample data and your desired output?

  3. #3
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Figured it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •