I have two tables.
Table 1 has the following columns.
The following query sets the count field to 3 where the host is microsoft.com
UPDATE hosts SET `count` = '3' WHERE hosts.host = "microsoft.com";
Table 2 has the following columns.
This query provides a list of hosts with the corresponding count of emails sent
SELECT `host` , COUNT( * ) AS total FROM `company_emails` WHERE `sent` = 1 GROUP BY host ORDER BY COUNT( * ) DESC;
How would I combine the two queries so that hosts.count field contains the "total" value calculated in the second query?