logoalt Hacker News

9devtoday at 9:21 AM1 replyview on HN

right? Sensible nesting (that's how I'd break and indent a long query anyway), folding in proper code editors, proper hierarchy... what's not to like?


Replies

neilvtoday at 10:04 AM

That `AND:` being prefix-order was the hint it just needs a few small finishing touches:

  (select (num name)
     :from  customers
     :where (exists (select name
                       :from  orders
                       :where (and (= customers.num
                                      orders.customer_num)
                                   (< price 50)))))