Joining two tables in one has a subquery which is returning id count present in one table which is not presented on another field of a particular user
As far as I understand, a simple inner join on the foreign key/primary key pair should suffice?

Assuming that ad_analytics.ad_id refers to inventory.id (consider using foreign key constraints!) and by "name" you mean name_of_campaign I have something like

select t.id,
  t.ad_id,
  sum(t.impression) total_impression,
  sum(t.view) total_views,
  sum(t.clicks) total_clicks,
  t.publisher_id,
  i.budget,
  i.name_of_campaign
from
  (select id,
     ad_id,
     max(impression)  impression,
     max(view)  view,
     max(clicks)  clicks,
     visitor_ip,
     publisher_id
  from ad_analytics
  group by ad_id, visitor_ip) t
  inner join inventory i
             on i.id = t.ad_id
group by t.ad_id;


in mind.

Note, that I had to introduce using the aliases as a prefix in the list of selected columns, as id would have been ambiguous otherwise (it's in both tables).