Please ConvertToEnglish() - Obscure SQL
Sometimes you come across a simple SQL statement. Yet you’re confounded by the reasoning behind it. You think, “What is this trying to do?!”
Never had that experience before? Well, here’s your chance. Here’s a heavily anonymised version:
select max(is_active) from customers where customer_id = ‘ABC’
And here’s the accompanying database table named “customers”.
customer_id
customer_name
is_active
ABC
ABC Pte Ltd
N
ABC
ABC Corp
N
ABC
ABC Corporation
Y
PQR
PQR [...]





