sql - Joining between several tables -
my question sql queries
using following tables:
1. consultant(id,name,skill) 2. customercompany(id,name address, phone, email, webaddr,market) 3. project(id,startdate,enddate,consultantid,customerid,days) 4. invoice(id,date,customer,amount,status) sql statement find names of consultants worked customers in berlin , london
i think have join tables cant definite query, suggestions?
something like
select c.name consultant c --join on projects consultant worked on join project p on p.consultantid = c.consultantid --join on customer companies projects join customercompany cc on cc.id = p.customerid --addresses might have various formats, use operator cc.address '%london%' or cc.address '%berlin%' might trick.
Comments
Post a Comment