/*
 * Souffle - A Datalog Compiler
 * Copyright (c) 2019 The Souffle Developers. All rights reserved
 * Licensed under the Universal Permissive License v 1.0 as shown at:
 * - https://opensource.org/licenses/UPL
 * - <souffle root>/licenses/SOUFFLE-UPL.txt
 */
// Test that multi-valued aggregates can become grounded from the outside scope.

.decl W(x:number, y:number)
.decl X(n:number)

X(1). X(2). X(10). X(11).

W(c, n) :- X(n), c = count : { X(m), m < n }.

.output W()
