Added SQL query for use cases