Solved

Count how many leads each user has

Posted on 2010-08-31
4
291 Views
Last Modified: 2012-05-10
Hi,
I have two tables

tblUsers
UserID  UserName

tblLeads
LeadID  UserID  LeadName

and I need to display how many Leads each User has.  The data is being displayed in a Users table with repeat region.   I should probably make a separate RecordSet for this calculation.
0
Comment
Question by:napsternova
  • 3
4 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 250 total points
ID: 33571247
select u.userId, u.username, count(l.leadid) as numofleads
from tbluser left u join tblleads l on u.userid=l.userid
group by u.userId, u.username
0
 

Author Comment

by:napsternova
ID: 33571583
Yep I believe that is it.
0
 

Author Comment

by:napsternova
ID: 33572638
Strange, the repeat region only displays the count of the first record.  User 1 has 3 so it repeats 3
0
 

Author Closing Comment

by:napsternova
ID: 33572903
Got it, thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.
It’s easy to embed any of your public Prezi presentations on your website or social network to share with others. Learn how simple it is in this tutorial.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now