User Profile

Collapse

Profile Sidebar

Collapse
drgoodvibe
drgoodvibe
Last Activity: Aug 2 '10, 04:55 PM
Joined: Jul 31 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • drgoodvibe
    replied to CrossTab Problems
    Code:
    SalesRep table
    ------------
    PersonName SalesPersonNumber
    
    
    SalesOrders table
    ----------
    SalesPersonNumber   Sales   ProductID
    The chart would sum the total sales of each Sales Person and show only their Person Name and the total Sales for that individual by ProductID as per the chart in #5

    Thank you for your help in advance, this has been a great learning experienc...
    See more | Go to post

    Leave a comment:


  • drgoodvibe
    replied to CrossTab Problems
    My apologies for making this overly complicated, what I'm trying to produce is the following chart. The code in post #3 gives me columns 1 and 2, I'm trying to add a 3rd and 4rth column that sums the Sales Person sales and groups it by product like in the 2nd column. however I can't seem to properly add the 3rd and 4rth columns.

    Sales results by Sales Person by Product.
    Code:
    Sales_persons   Product1  Product2  Product3
    ...
    See more | Go to post

    Leave a comment:


  • drgoodvibe
    started a topic CrossTab Problems

    CrossTab Problems

    Thank you, I'm making a little headway here as I can get the following code to return the first column for "ChartSales " correctly. Now I'm trying to add 2 more columns that sum different product sales.

    The working portion of the code for 1 product is this so far. This gives the correct return.

    Code:
    SELECT sales_persons.Name, SUM(orders_table.Quantity) AS ChartSales
    INNER JOIN sales_persons
    ON sales_persons.PersonID
    ...
    See more | Go to post
    Last edited by NeoPa; Aug 2 '10, 03:20 PM. Reason: Please use the [CODE] tags provided; Updated to reflect split

  • SQL Query Showing Total Sales by Each Person and Each Product.

    Hi There,

    I'm trying to write a query that returns the total sames amount by each sales person for each product -- I'm having issues with the join sequence at this moment. Any help would be much appreciated!

    Tables would look like this..

    Products table
    ------------
    ProductNum Name Price


    SalesRep table
    ------------
    PersonNum Name Region

    ...
    See more | Go to post
No activity results to display
Show More
Working...