Avatar of svs1919
svs1919

asked on 

AS SQl Query to group partial data

I Have a MS sql table which has 3 columns Account,Month, Fee. There are four accounts (A1,A2,A3,A4)and each account has associated fee for each month. No I want to query the table in such a way I can see all the Account fees for all the months , however for account A4 i want show sum value of A1 and A2 grouped by each month , So basically I want to show A4 = A1+A2 for every month Along with other account values

Something like this

User generated image

SQLMicrosoft SQL Server 2008Microsoft SQL Server

Avatar of undefined
Last Comment
svs1919
ASKER CERTIFIED SOLUTION
Avatar of Andrei Fomitchev
Andrei Fomitchev
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of svs1919
svs1919

ASKER

Thank you!
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo