I am trying to get the _total_ number of jobs
that each company has in the db.
In other words I want to get each distinct company
that has jobs in the jobs table and the _total_ number
of jobs that it has in the jobs table.
What would be the best query that I could use?
I'm using 6.4.2.
Table = jobs
+-------------+---------------+-------+
| Field | Type | Length|
+-------------+---------------+-------+
| job_id | int4 not null | 4 |
| company_id | int4 | 4 |
| title | varchar() | 50 |
...
+-------------+---------------+-------+
Table = company
+--------------+---------------+-------+
|Field |Type | Length|
+--------------+---------------+-------+
| company_id | int4 not null | 4 |
| company_name | varchar() | 100 |
| email | varchar() | 100 |
...
+--------------+---------------+-------+
Thanks
Andy