Solved Query Group by

mansied

Member
Local time
Today, 05:12
Joined
Oct 15, 2020
Messages
100
hello,
I have a quay to group by 3 field and do sum in other fields .
I want to have two other fields but not to be group by I want to be a part of table but i face the below error.
how can do that ? any idea ?
I appreciate for your help



1632422993414.png
 
To add the additional column without grouping them, use a separate query to join the group by query with your table again.

Hope that helps...
 
First, action queries (UPDATE, INSERT, DELETE, etc.) are a red flag of a poor database. Another red flag is storing a calculated value (SUM()). So, I'm really interested in what the purpose of this query is? Why must you move data and not use a query to obtain the data you want?

Then for your specific question--data issues are best communicated with sample data. Please provide us 2 sets of sample data:

A. Starting data from DA_Converted. Include table and field names and enough data to cover all cases.

B. Expected results of A. Show us what data you expect to end up with after running the data from A through your query.

Again, 2 sets of data that demonstrate the before and after of this query.
 

Users who are viewing this thread

Back
Top Bottom