here is what is want to do. i want to filter Job Types for X axis and Job count for the y axis. to x axis i want to get job type with similar name to use only once and for y axis job count of that. if i consider cutting, then it will be cutting(x axis)-1400(y axis-sum of 2nd and 5th row). so how to get this using a sql query? my table name is supplier.
Output will be like:
| jobType | totaljobCount |
|---------|---------------|
| CPI | 302 |
| Cutting | 1400 |
| Ironing | 800 |
You can do a
GROUP BY
on thejobType
and useSUM()
function to aggregate thejobCount
values.