Solved

Count how many leads each user has

Posted on 2010-08-31
4
292 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…

816 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

12 Experts available now in Live!

Get 1:1 Help Now