SELECT S.cost
FROM (select * from ((SELECT shoppingserviceid, cost, bsid FROM service JOIN shopping_service ON service.serviceid = shopping_service.serviceid) S JOIN
provided_service ON provided_service.shoppingserviceid = S.shoppingserviceid)) P
JOIN provide_service_detail
ON provide_service_detail.providedserviceid = P.providedserviceid