SQL and Prolog have a large area of functional overlap as they are both based on predicate logic. However, SQL more naturally aligned with the database-centric worldview of many business systems and offered a more natural way (for business users) to ask business questions. So when SQL took off, it was adopted for many solutions where Prolog might have been used previously.