fixed #2. Included in test case. Had to give up wildcards because of sqlite limitation (filters on aggregates)