One way to do this would be to use case expression in your aggregate functions like what I am showing below:SELECT
policy.a_id,
COUNT(CASE WHEN policy.datecreated >= '20120301' AND policy.datecreated < '20120322' THEN policy.P_Id END )
AS Period1_itemcount,
SUM(CASE WHEN policy.datecreated >= '20120301' AND policy.datecreated < '20120322' THEN policy.price END )
AS Period1_amount
-- similar counts and sums for other date ranges
FROM
Policy
INNER JOIN Agent
ON policy.A_Id = Agent.A_Id
WHERE
-- date range that covers all the periods of interest
policy.datecreated >= '20120101' AND policy.datecreated < '20120322'
GROUP BY
policy.A_IdI am only showing columns for one period, you can add other periods as required. I also changed the way the date ranges are specified (using a >= and a <). That is better for a few reasons.