MySQL Forums
Forum List  »  Newbie

Timestamp Month
Posted by: Kelly Lowell
Date: December 16, 2020 03:30PM

I have an aggregated field that counts batches along with a client number associated to it that looks like this:


FieldCount ClientNumber
618058 07730
537348 00776
354394 07187

SELECT COUNT(Batch_id) AS FieldCount
,ASG_NUM AS ClientNumber
FROM [SF_SpringfieldA].
WHERE Timestamp >= '12/01/2020'
GROUP BY ASG_NUM

I'd like to add a third column that adds the month number from the timestamp field that doesn't undo the aggregating. Any suggestions???

Options: ReplyQuote


Subject
Written By
Posted
Timestamp Month
December 16, 2020 03:30PM
December 16, 2020 09:29PM
December 17, 2020 05:23AM
December 17, 2020 06:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.