Bristlecone interview question

inheritance, joins in sql, one simple logical program