Earlier quoted context omitted.
Er, have you heard of datalog or Prolog? Declarative programming really does work. SQL was just... Botched.
I think SQL is better than datalog. I suspect this is one of those opinions that may be somewhat outside consensus on a forum like HN, but is strongly within the consensus more broadly.
SQL is pretty horrifying when you start getting tree structures or recursive structures. While Datalog handles those like a champ.
SQL is really nice for columnar data, and it's well supported almost everywhere.
Though Datalog isn't half bad at columnar data either.