SQL: print the address of the publisher who has published only one book -
tables:
auth(auth, age), book(title,auth,pubname), publ(pubname,address) i attempting come query print address of publisher has published 1 book here attempt, please correct me if wrong: not homework, part of study guide upcoming test.
select address publ pubname in ( select pubname book group pubname having count(*) = 1) i think right not sure.
inner join group query solve problem.
select address from publ pb inner join (select pubname book group pubname having count(*) = 1) b on b.pubname = pb.pubname
Comments
Post a Comment