Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Count how many leads each user has

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.

809 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