Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Select stmt

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-12 : 09:36:36
meer writes "I have following tables

Banner (Master)
-----------
intbannerId
intAffiliateId

Advertiser(Master Table)
----------
intAffiliateId
chvName
chvAddress

BannerView (Transaction)
-----------
intView
intbannerId
intAffiliateId

Clicks
------
inrClickId
intbannerId
intAffiliateId

PLeads (Transaction)
--------
intLeadId
intbannerId
intAffiliateId

CLeads (Transaction)
--------
intLeadId
intbannerId
intAffiliateId

Questions
1) want to find out the total number of leads provided in Cleads and Pleads by a particulalr affiliate.

2)want to get report on total banner views ,Clicks and Leads

Regards Meer"

yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-03-12 : 13:02:01
1) want to find out the total number of leads provided in Cleads and Pleads by a particulalr affiliate.

SELECT SUM(TotalLeads) FROM
((SELECT Count(intLeadID) as TotalLeads FROM Pleads WHERE intAffiliateID = 1)
UNION
(SELECT Count(intLeadID) as TotalLeads FROM Cleads WHERE intAffiliateID = 1))


as for question 2 "want to get report on total banner views ,Clicks and Leads" based upon what criteria. Is intbannerID and intAffiliateID a 1 to 1 relationship or can affiliates share banners?



Go to Top of Page

meer_b
Starting Member

1 Post

Posted - 2002-03-13 : 00:29:05
Thanks yacoo....:)
Questions
1) want to find out the report on total number of leads provided in Cleads and Pleads by a affiliates order by total of Cleads and Pleads.

2)want to get report on total banner views ,Clicks and Leads here affiliates can shear banners. (1 banner to many affiliates)

Regards Meer"


Go to Top of Page
   

- Advertisement -