Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Pivot / Crosstab With Count Unique data.

 
   Database Forums (Home) -> General Discussion RSS
Next:  Calculated value dilemma  
Author Message
Lemune

External


Since: Jul 16, 2008
Posts: 7



(Msg. 1) Posted: Wed Jul 16, 2008 10:57 pm
Post subject: Pivot / Crosstab With Count Unique data.
Archived from groups: comp>databases (more info?)

Hi,

I'm trying to create pivot, my data are area, sub area, member code.
On Pivot/Crosstab data area i want to calculate how many member that
access in sub area, and how many member that access in area, where as
on the raw data it self my member has many record on each area and sub
area. My be this will make an sample

* AreaA SubAreaA Member1
* AreaA SubAreaA Member2
* AreaA SubAreaA Member3
* AreaA SubAreaA Member1
* AreaA SubAreaA Member1
* AreaA SubAreaA Member2
* AreaA SubAreaA Member1
* AreaA SubAreaA Member3
* AreaA SubAreaA Member1
* AreaA SubAreaA Member1
* AreaA SubAreaA Member2
* AreaA SubAreaA Member3
* AreaA SubAreaA Member1
* AreaA SubAreaA Member1
* AreaA SubAreaA Member2
* AreaA SubAreaA Member1
* AreaA SubAreaB Member3
* AreaA SubAreaB Member1
* AreaA SubAreaB Member1
* AreaA SubAreaB Member2
* AreaA SubAreaB Member3
* AreaA SubAreaB Member1
* AreaB SubAreaA Member1
* AreaB SubAreaB Member2
* AreaB SubAreaA Member1
* AreaB SubAreaB Member3
* AreaB SubAreaA Member1

The result of my pivot is That I want:

Sub Area

Area SubAreaA SubAreaB Total

AreaA 3
3 3

AreaB 1
2 3

Total 3
2 3

Could we create this kind of pivot?

If it could be done, how we do it?

Thanks in advanced

 >> Stay informed about: Pivot / Crosstab With Count Unique data. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Basic Crosstab - I'm having a design issue with my web application and I believe that it involves a fairly basic crosstab, but I'm not sure of which style of query I should use. Say that I have two tables, one full of users and another full of projects, linked to the..

Query Help on Report Using Pivot Table - Hi, I have this problem, I want to make report using PivotTable/CrossTab. The problem is, I want so show NULL value to. This is my query to get the data (I'm using an application that can make pivottable from the data AND MySQL 5) SELECT..

unique ID - pl 200001 aa - postgresql - i have little problem i need to create unique ID for system user, which looks like PL 200001 AA, First part PL, is preselected by user, second part 200001 is generatet by system 200001 - 999999, if it's bigger then 999999 system change AA to AB end..

Unique Index Vs Primary Index in SQL Server 2000 - Hi Will there be any performance difference if a primary index is created instead of a unique index or vice-versa in SQL Server 2000. All the columns are non-nullable. Thanks harish

Create SELECT COUNT from given statement - Hi. I want to do a SELECT COUNT(*) for some SELECT-Statements created in other parts of an application and I don't know exactly what that elsewhere created SELECT looks like. So i thouht something like 'SELECT COUNT(*) FROM ( ... )' might work. 1) Doe...
   Database Forums (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]