Single query to return counts over different IDs in a single record select count(title_id)as algodata from titles where pub_id =1389  
select count(title_id)as binnet   from titles where pub_id =0877  
select count(title_id)as newmoon  from titles where pub_id =0736


The database used is pubs in SQL Server.

Can I use a single query to  show the count of records for each publisher (here there are 3 publishers) in a single record?
Similar to @ypercubes but to get one row without 3 separate queries

select
     count(CASE WHEN pub_id = '1389' THEN title_id END) as algodata,
     count(CASE WHEN pub_id = '0877' THEN title_id END) as binnet,   
     count(CASE WHEN pub_id = '0736' THEN title_id END) as newmoon  
from titles
where pub_id IN ('1389', '0877', '0736') 


Also, decide if your values are numbers or strings and be consistent to avoid datatype conversions