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]

Reply via email to