Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join with 2 COUNT( ) columns
Message
From
05/04/2001 01:52:03
Adam Skowronski
Custom Designed Systems
Miami, Florida, United States
 
 
To
04/04/2001 19:03:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00492027
Message ID:
00492243
Views:
16
Thanks to both of you, and I will be experimenting with both solutions tomorrow, but beforehand, I think they are just short of what I need.

Here is the complete data setup and what I am trying to do.

There is the OrderInfo table, containing the (pertinent) fields, [deliverydate, zip-fordelivery, custid]. Then the BillingInfo table, [zip-forbilling, custid].
I am selecting all OrderInfo records based on a deliverydate [ldDate], counting the number of orders for each zip code [oZipCnt], then trying to obtain the number of orders placed from the BillingInfo table... Possibly, I should be trying to join the two tables based on the CustID, but that would only look in one direction - I think.

In a nutshell, I trying to see how many orders were both ordered from [bZipCnt] and sent to [oZipCnt] for any zipcode for the deliverydate [ldDate]. Ultimately, producing 3 columns [bZipCnt, Zip, oZipCnt]. One client could send to many zips, and another zip can receive orders from many clients.

Thanks again, and I hope this explains a little more what I'm trying to do.
Adam J Skowronski
Previous
Reply
Map
View

Click here to load this message in the networking platform