Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complex Query
Message
From
26/09/2000 17:51:25
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00421217
Message ID:
00421232
Views:
14
Without setting up similar tables and testing it, this would be my first guess:
select customer.name,sum(summary.total)
from customer,summary
where customer.cust_id = summary.cust_id
and summary.inv_num = detail.inv_num
and customer.bill_st = "GA"
and summary.shp_date >= (date() - 365)
and summary.inv_num not in
(select detail.inv_num from detail where substr(detail.inv_id,1,2)="SE")
group by customer.name
having sum(summary.total) > 1000

My apologies for wasting your time if it doesn't work or at least get you close.
Previous
Reply
Map
View

Click here to load this message in the networking platform