News for hackers. Stuff that matters.
Re:We Can Do Better Than SQL by RedCrowbar on Monday August 10, 2020 @11:12PM (#24116809)
> Can you model this in EdgeQL?

Absolutely!

  WITH
    april := <datetime>'2020-04-01T00:00+00',

    NewCustomers := (
      SELECT Customer
      FILTER
        NOT EXISTS (
          SELECT .orders
          FILTER .date < april
        )
    ),

    AprilCustomers := (
      SELECT Customer
      FILTER
        datetime_truncate(.orders.date, 'months') = april
    ),

    NewAprilCustomers := (
      SELECT AprilCustomers
      FILTER AprilCustomers IN NewCustomers
    )

  SELECT
    (count(NewAprilCustomers) / count(AprilCustomers)) * 100;
This assumes the following schema:

  type Order_ {
     property date -> datetime;
  }

  type Customer {
     multi link orders -> Order_;
  }
Re:We Can Do Better Than SQL by querylangs2020 on Monday August 10, 2020 @11:34PM (#24116920)
Thanks. I'm going to dig in a bit more. I've been sold by the above and the homepage.. :)