Skip to content

Snippets

Evgeny Skvortsov edited this page May 24, 2023 · 4 revisions

Snippets

Aggregation

OfficeStats(office:,
            total_comp? += compensation,
            average_comp? Avg= compensation,
            employee_count? += 1) distinct :-
  Employee(office:, compensation:);

Inner Join

EmployeeLocation(name:, city:) :-
  Employee(name:, office:),
  Office(office:, city:);

FractionOfPurchasesByActiveCustomer

FractionOfPurchasesByActiveCustomer

Clone this wiki locally