Sample: select * from servers
Start date:
End date:
Show query statements
select a.pid,p.name,sum(p.price),count(a.pid) from accounts a,package p where a.startdate>=$startdate and a.startdate<=$enddate and a.pid=p.pid group by a.pid order by p.name
select sum(p.price),count(a.pid) from accounts a,package p where a.startdate>=$startdate and a.startdate<=$enddate and a.pid=p.pid