Works, kind of...
SELECT distinct area_code as AC, phone_num as PN, ord_date, store_num
FROM `orders_p`
GROUP BY AC, PN
HAVING min(ord_date)>='20070101' and min(ord_date)<='20070128'
Returns empty set... (?!)
SELECT count(*), ord_date, store_num
FROM `orders_p`
GROUP BY store_num
HAVING min(ord_date)>='20070101' and min(ord_date)<='20070128'
Hoping to get something like:
count(*) ord_date store_num
--------- --------- -----------
35 20070101 1
24 20070101 2
36 20070101 3
[etc.]
(The value in ord_date isn't meaningful and probably can be removed from the columns.)