I have two tables... APPLICANTS and DEALS. There can be multiple deals per
applicant but only one applicant per deal.
SELECT COMPANY_ID, COUNT(APPLICANT_ID)
FROM APPLICANTS
GROUP BY COMPANY_ID
Results:
1 3
2 9
3 7
SELECT COMPANY_ID, COUNT(DEAL_ID)
FROM DEALS
GROUP BY COMPANY_ID
Results:
1 3
2 11
3 8
What I'm trying to get is:
1 3 3
2 9 11
3 7 8
My problem is actually a little harder than this but if someone could tell
me HOW to get my desired results above in a single SQL query then I could
probably figure out the rest.
-Novak
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: application.cfm Jim Davis
- RE: application.cfm Bushy
- RE: application.cfm Tony Weeg
- RE: application.cfm Jim Davis
- RE: application.cfm Bushy
- RE: application.cfm Tony Weeg
- RE: application.cfm Bushy
- RE: application.cfm Tony Weeg
- RE: application.cfm Matt Robertson
- RE: application.cfm Gyrus
- RE: SQL Puzzle? cf-talk
- RE: SQL Puzzle? Tony Weeg
- RE: application.cfm Bushy
- RE: application.cfm Won Lee
- RE: application.cfm Philip Arnold
- RE: application.cfm Bushy
- RE: application.cfm Pascal Peters
- RE: application.cfm Bushy
- RE: application.cfm Philip Arnold
- RE: application.cfm Bushy
- RE: application.cfm Mike Kear