group values in a query (1 Viewer)

ryprobg

Member
Local time
Today, 09:06
Joined
Sep 3, 2022
Messages
59
hello need a quick help to grouping (service maintenancier) in this query by geting (somme of NB service) once time this is the maximun value of dcount for (service maintenancier)..
the meaning is to groupnig each (service maintenancier) with there (somme of nb TR)
exemple :
Atelier Bulls et camions : 3
Atelier Electrique Engins : 2
Atelier Electrique Engins : 1
Station service : 1
please refere to the attachements below
 

Attachments

  • 01.PNG
    01.PNG
    18.6 KB · Views: 66
  • 02.PNG
    02.PNG
    14.5 KB · Views: 69
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:06
Joined
May 7, 2009
Messages
19,246
create Total query from your query.
 

plog

Banishment Pending
Local time
Today, 03:06
Joined
May 11, 2011
Messages
11,669
Please use data to demonstrate what you want. Provide 2 sets of data:

A. Starting data from your tables. Include table/field names and enough data to cover all cases.

B. Expected results of A. Show us what data you expect your query to generate when you feed it the data from A.

Again, 2 sets of data--started and expected results based on the starting data.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:06
Joined
May 7, 2009
Messages
19,246
select [service maintenance:], count("1") As CountOfMaintenance from [test unique]
group by [service mintenance:]
 

ryprobg

Member
Local time
Today, 09:06
Joined
Sep 3, 2022
Messages
59
select [service maintenance:], count("1") As CountOfMaintenance from [test unique]
group by [service mintenance:]
how i can make the somme of count (CompteDeNR) by service maintenance and by date and SommeDeTR like this :
* atelier Bull et camions : 20/09/2022 | ( 1+1+1) | (4.19 +3+5.3)
* atelier Electrique Engins : 20/09/2022 | ( 1+1) | (5.19 +2)
* station service : 20/09/2022 | (1) | (0)
* atelier Bull et camions : 21/09/2022 | ( 1+1) | (2.09+0)
 

Attachments

  • sumOfCount.PNG
    sumOfCount.PNG
    15.6 KB · Views: 58
  • sumOfCount2.PNG
    sumOfCount2.PNG
    32.5 KB · Views: 64

ryprobg

Member
Local time
Today, 09:06
Joined
Sep 3, 2022
Messages
59
how i can make the somme of count (CompteDeNR) by service maintenance and by date and SommeDeTR like this :
* atelier Bull et camions : 20/09/2022 | ( 1+1+1) | (4.19 +3+5.3)
* atelier Electrique Engins : 20/09/2022 | ( 1+1) | (5.19 +2)
* station service : 20/09/2022 | (1) | (0)
* atelier Bull et camions : 21/09/2022 | ( 1+1) | (2.09+0)
anyone help please!!!!!!!!!!!!!
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:06
Joined
Sep 21, 2011
Messages
14,448
Little impatient aren't we? :(

You group by all the required fields?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:06
Joined
May 7, 2009
Messages
19,246
you create a Total query from your original query/table.
see Query1 on this demo.
 

Attachments

  • testUniwur.accdb
    496 KB · Views: 74

Users who are viewing this thread

Top Bottom