P
Paid The Umpire
Hey,
I have a table which has records inserted into it, on a varying degree
of activity (some days have a lot of record on other days none).
Client_Reference_Number 7char
IMEI_Number 14char
Start_Date_And_Time datetime
Number_Of_Bytes int
Cost_To_Client currency
What i want to do through an SQL query, is to get a summary of all
records made during two dates.
The Total Number_Of_Bytes and the Total Cost_To_Client for each day.
So something like thus:
Client_Reference_Number, IMEI_Number, Start_Date_And_Time,
SUM(Number_Of_Bytes), SUM(Cost_To_Client)
1000000, 300003000129100, Jan 15 2006, 118, $0.38
1000000, 300003000129100, Jan 16 2006, 0, $0.00
1000000, 300003000129100, Jan 17 2006, 0, $0.00
1000000, 300003000129100, Jan 18 2006, 145, $9.50 etc.
I've got it grouped us correctly...
SELECT Client_Reference_Number, IMEI_number,
Format$([Start_Date_And_Time],'Long Date'),
Sum(SBD_Records.Number_Of_bytes_sent), Sum(SBD_Records.Cost_To_Client)
FROM SBD_Records
GROUP BY Client_Reference_Number, IMEI_number,
Format$([SBD_Records].[Start_Date_And_Time],'Long Date');
But this will only show record which have a record inserted in the
table. What i need is all dates, regardless of the amount of records in
the table.
Any help?
Regards,
Paid The Umpire!
I have a table which has records inserted into it, on a varying degree
of activity (some days have a lot of record on other days none).
Client_Reference_Number 7char
IMEI_Number 14char
Start_Date_And_Time datetime
Number_Of_Bytes int
Cost_To_Client currency
What i want to do through an SQL query, is to get a summary of all
records made during two dates.
The Total Number_Of_Bytes and the Total Cost_To_Client for each day.
So something like thus:
Client_Reference_Number, IMEI_Number, Start_Date_And_Time,
SUM(Number_Of_Bytes), SUM(Cost_To_Client)
1000000, 300003000129100, Jan 15 2006, 118, $0.38
1000000, 300003000129100, Jan 16 2006, 0, $0.00
1000000, 300003000129100, Jan 17 2006, 0, $0.00
1000000, 300003000129100, Jan 18 2006, 145, $9.50 etc.
I've got it grouped us correctly...
SELECT Client_Reference_Number, IMEI_number,
Format$([Start_Date_And_Time],'Long Date'),
Sum(SBD_Records.Number_Of_bytes_sent), Sum(SBD_Records.Cost_To_Client)
FROM SBD_Records
GROUP BY Client_Reference_Number, IMEI_number,
Format$([SBD_Records].[Start_Date_And_Time],'Long Date');
But this will only show record which have a record inserted in the
table. What i need is all dates, regardless of the amount of records in
the table.
Any help?
Regards,
Paid The Umpire!