This topic is locked
[SOLVED]

 Crosstab Report Count

3/11/2016 11:22:50 AM
PHPRunner General questions
R
RockyMtnHi author

in the Totals screen of the Crosstab report there are Min, Max, Sum and Average capabilities, but not Count. I need to count the number of occurrances of an event, so this is critical for me.
Is this possible, or are there any work-arounds? I have searched the forum and didn't find anything.
Thanks in advance for the help...

R
RockyMtnHi author 3/11/2016

Found the solution. You have to create a query that already has the data you want. Then you can use all of the SQL summary functions as needed, like Count, Max, Min, Avg, Sum, Stddev. Here is the query that worked for me:
SELECT SocialPosts.DatePosted,

COUNT(Titles.Title) AS PostCount,

Titles_1.Title

FROM (wildblv0_WBPTitlesCatalog.SocialPosts SocialPosts

INNER JOIN wildblv0_WBPTitlesCatalog.Titles Titles

ON (SocialPosts.BookTitleId = Titles.TitleId))

INNER JOIN wildblv0_WBPTitlesCatalog.Titles Titles_1

ON (SocialPosts.BookTitleId = Titles_1.TitleId)

GROUP BY Titles.Title, SocialPosts.DatePosted
If you need a great SQL tool to create visual queries so you can grab the SQL then I recommend Toad. It works for all client-server databases. It is a life saver.
Case closed.