I have a table that records the market conversation by the employees with the customers relevant area customer, date and customer Type.
I want to be able to get the count of interactions by 5-week blocks, as long as the user's date and differentiation is presented by the customer type A, B, C.
I want to make A, B and C series with the return of returning data and the count of market interactions grouped by a 5-week block.
Something like this:
by value double =] {14, 16, 18, 19, 15, 18, 19, 14, 15}; String [] bxValues = {"50", "45", "40", "35", "30", "25", "20", "15", "10"}; One can be A-series once I have my A, B and C series, then I can feed them in the Stackedchart graph.
I would also like to be able to accommodate X = 5 in 1 to 20, so that it can be a step in the form of dynamic. Any hints or URLs will be appreciated.
My initial idea was to create a temporary table with a query once and an additional area that contained a math in it if the statement was populated by the block count of this matter to record its date Accordingly, then I can expect that with other group criteria for other criteria. But in reality it is not sure what the best way to take the first step is,
UPDATE:
This is what I have done and it works. It's actually quite simple to get there in some verbal which I can easily convert to standards.
Select MI1. [CAQ] Change from X_AXISBLOCK #myTempTable [ql10_crm] as CAQ, CAQ, floor (DateDiff (d, change as mi1.IDate (Date, '11 / 07/2010 ', 103)) / 5) Join [MarketInteraction] MI1 Insider [ql10_crm]. [TerritoryCustomer] On MI1 [Customer ID] = [ql10_crm]. [TerritoryCustomer] [Customer ID] ou MI1 [1,2,4] and [ql10_crm] in [CAQ] [TerritoryCustomer] (Date, '18 / 06/2009 ', 103) and Convert (Date Time, '11 / 07/2010', 103)) between [TerritoryId] (19) and (MI1. [IDate] CONVERT; Selection CAQ, X_AXISBLOCK, COUNT ([CAQ]) by #myTempTable Group by CAQ, CAQ, X_AXISBLOCK by X_AXISBLOCK order; Definitely how to execute the answer, will be to test
(CAQ, X_AXISBLOCK, COUNT) This is my output where 1 A CAQ = A, 2 = B, 4 = C:.
2 2 2 1 6 2 6 2 4 3 3 4 1 5 4 6 4
There is only one thought, but it seems that you may be able to do this instead of using a stored procedure in a SECL (usually better) .
Available to you for analytical tasks. These are well supported in Oracle for a long time, but they are now looking for their way into SQL Server.
For example, you might be looking at something like this (no solution - actually only one indicator):
select a.custid, a.weekblock, Exclock box X from the market as a (SELECT x Custid, DATEPART (wk, x.date) / 5) at COUNT (a.custid) (a.weblockblock by site, a.custid) a < / Pre> If you provide more information about your table structure, then a better solution might possibly be derivative.
Comments
Post a Comment