How to group data by using query Ms Access 365

Beginner and newbie for Ms Acces or even higher but, forgot how to do so
fist of all  open up Ms access and create the new table named as defualt value Table1
afer that go to design view where we will name the colums as follows
ID   type Auto
Student_name   Text
Amount    Number
when    date/time


that all

open the table and input some sample data as follow 
Student A
Student B
Student C
Student D

For Amount 
Student A   10
Student B   20
Student C    15
Student D   30 


When
just select today to input the data.

then 
repeat the about step in order to have some same name many times in the table 

Next How to make query to grouped data
on menu bar go to create and select query design
show the table1

select field as follow
student_name
amount

after that on the menu bar ribbon just look for SUM icon and click 1 time
you pobally get the query of student_name and amount be grouped by 

click to Sum on Amout 

We can sort data from max to min or min to max 
don't forget to save as query1!


Last step
on menu bar
create the report 
click on report wizard 
source will be query1
input both of the field 

how to show the total numbes of student and total amount of money

go to design view and click on Student Name textbox then click on SUM icon on the menu bar select count 

then select the SumOfAmount and click SUM icon select SUM

That all
save report as query1


ไม่มีความคิดเห็น:

แสดงความคิดเห็น