Simplified SQL query.