Jump to content

mysql sum question


otixz

Recommended Posts

hi,

 

I have two tables:

 

tblinquiries:
course     |total|date
BSCS       | 25  |22/04/2008
BSIT       | 10  |22/04/2008
HRM        | 5   |22/04/2008
ACT        | 11  |22/04/2008
Tourism    | 52  |22/04/2008

and tblcourses:
coursename     |type
BSCS           | 1  
BSIT           | 1  
HRM            | 2   
ACT            | 2  
Tourism        | 3  

 

My question is:

1.) how can I find the sum of total of each type?

 

example:

Type    |  Total
1       |   35
2       |   16
3       |   52

 

please help...I really can't see a way how to do it....

 

Link to comment
https://forums.phpfreaks.com/topic/103233-mysql-sum-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.