Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Counting the number of times people visit

wcolekuSep 14 2007 — edited Oct 13 2007
I have a table of names for example

Bill
Fred
Bob
Jim
Jim
Erica
Erica
Sam
Sam
Sam
Julie
Julie
Julie
Michelle
Michelle
Jack
Jack
Jack
Jack


End result should be

3 people visited 1 time
3 people visited 2 times
2 people visited 3 times
1 people visited 4 times

Is there a way to do this in sql with analytics or just using count? If so how would one go about it.

Thanks in advance
Wayne

Message was edited by:
wcoleku
End result count was wrong

Comments

Rookie_86
Make use of Date Dimension Table - and join with the fact table.
MKKrishna
Answer
to get end date create a logical column using
Timestampadd(sql_tsi_day,7,start_date) you will get week end date.. Use it

Your question is not clear though..
Marked as Answer by UOOLK · Sep 27 2020
868910
Use 'is between'
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 10 2007
Added on Sep 14 2007
5 comments
2,006 views